]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ARM: 9438/1: assembler: Drop obsolete VFP accessor fallback
authorArd Biesheuvel <ardb@kernel.org>
Thu, 5 Dec 2024 13:30:52 +0000 (14:30 +0100)
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tue, 14 Jan 2025 12:29:25 +0000 (12:29 +0000)
Now that the minimum supported binutils version is 2.25, we no longer
need a workaround for binutils older than 2.24 for accessing VFP control
registers from assembler.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
arch/arm/Kconfig
arch/arm/Kconfig.assembler [deleted file]
arch/arm/include/asm/vfp.h
arch/arm/include/asm/vfpmacros.h
arch/arm/vfp/vfpinstr.h

index 202397be76d8037b531b34dee16c7dfcfd0124ef..19ca8c271ffec1127b732fc1ea8ddea1bfff0c51 100644 (file)
@@ -1751,5 +1751,3 @@ config ARCH_HIBERNATION_POSSIBLE
        default y if ARCH_SUSPEND_POSSIBLE
 
 endmenu
-
-source "arch/arm/Kconfig.assembler"
diff --git a/arch/arm/Kconfig.assembler b/arch/arm/Kconfig.assembler
deleted file mode 100644 (file)
index 5cb31aa..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-
-config AS_VFP_VMRS_FPINST
-       def_bool $(as-instr,.fpu vfpv2\nvmrs r0$(comma)FPINST)
-       help
-         Supported by binutils >= 2.24 and LLVM integrated assembler.
index 157ea34261586d136ab574cf4f4bed8e3148dfb1..85ccc422d4d0b889d409163aacf6d8c8b74fbfcb 100644 (file)
@@ -9,16 +9,6 @@
 #ifndef __ASM_VFP_H
 #define __ASM_VFP_H
 
-#ifndef CONFIG_AS_VFP_VMRS_FPINST
-#define FPSID                  cr0
-#define FPSCR                  cr1
-#define MVFR1                  cr6
-#define MVFR0                  cr7
-#define FPEXC                  cr8
-#define FPINST                 cr9
-#define FPINST2                        cr10
-#endif
-
 /* FPSID bits */
 #define FPSID_IMPLEMENTER_BIT  (24)
 #define FPSID_IMPLEMENTER_MASK (0xff << FPSID_IMPLEMENTER_BIT)
index ba0d4cb5377e0759b7b557ad2f65f9b091d17ca3..e2e1d5a3727aa70b4bafbe8ca842704af603b2a3 100644 (file)
@@ -8,7 +8,6 @@
 
 #include <asm/vfp.h>
 
-#ifdef CONFIG_AS_VFP_VMRS_FPINST
        .macro  VFPFMRX, rd, sysreg, cond
        vmrs\cond       \rd, \sysreg
        .endm
        .macro  VFPFMXR, sysreg, rd, cond
        vmsr\cond       \sysreg, \rd
        .endm
-#else
-       @ Macros to allow building with old toolkits (with no VFP support)
-       .macro  VFPFMRX, rd, sysreg, cond
-       MRC\cond        p10, 7, \rd, \sysreg, cr0, 0    @ FMRX  \rd, \sysreg
-       .endm
-
-       .macro  VFPFMXR, sysreg, rd, cond
-       MCR\cond        p10, 7, \rd, \sysreg, cr0, 0    @ FMXR  \sysreg, \rd
-       .endm
-#endif
 
        @ read all the working registers back into the VFP
        .macro  VFPFLDMIA, base, tmp
index 32090b0fb250b8d5aab82207fc3214b6020c8ff3..a2f0c47e0ce7bf871b6b8750bb62b62d0599878e 100644 (file)
@@ -62,8 +62,6 @@
 #define FPSCR_C (1 << 29)
 #define FPSCR_V        (1 << 28)
 
-#ifdef CONFIG_AS_VFP_VMRS_FPINST
-
 #define fmrx(_vfp_) ({                         \
        u32 __v;                                \
        asm volatile (".fpu     vfpv2\n"        \
                     : : "r" (_var_) : "cc");   \
 })
 
-#else
-
-#define vfpreg(_vfp_) #_vfp_
-
-#define fmrx(_vfp_) ({                                         \
-       u32 __v;                                                \
-       asm volatile ("mrc p10, 7, %0, " vfpreg(_vfp_) ","      \
-                     "cr0, 0 @ fmrx    %0, " #_vfp_            \
-                    : "=r" (__v) : : "cc");                    \
-       __v;                                                    \
-})
-
-#define fmxr(_vfp_, _var_) ({                                  \
-       asm volatile ("mcr p10, 7, %0, " vfpreg(_vfp_) ","      \
-                     "cr0, 0 @ fmxr    " #_vfp_ ", %0"         \
-                    : : "r" (_var_) : "cc");                   \
-})
-
-#endif
-
 u32 vfp_single_cpdo(u32 inst, u32 fpscr);
 u32 vfp_single_cprt(u32 inst, u32 fpscr, struct pt_regs *regs);