Skip to content

Commit

Permalink
ARM: 9438/1: assembler: Drop obsolete VFP accessor fallback
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Signed-off-by: Ard Biesheuvel <[email protected]>
Signed-off-by: Russell King (Oracle) <[email protected]>
  • Loading branch information
ardbiesheuvel authored and Russell King (Oracle) committed Jan 14, 2025
1 parent 386f2d9 commit 50867db
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 51 deletions.
2 changes: 0 additions & 2 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1751,5 +1751,3 @@ config ARCH_HIBERNATION_POSSIBLE
default y if ARCH_SUSPEND_POSSIBLE

endmenu

source "arch/arm/Kconfig.assembler"
6 changes: 0 additions & 6 deletions arch/arm/Kconfig.assembler

This file was deleted.

10 changes: 0 additions & 10 deletions arch/arm/include/asm/vfp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
11 changes: 0 additions & 11 deletions arch/arm/include/asm/vfpmacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,13 @@

#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
Expand Down
22 changes: 0 additions & 22 deletions arch/arm/vfp/vfpinstr.h
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand All @@ -78,26 +76,6 @@
: : "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);

Expand Down

0 comments on commit 50867db

Please sign in to comment.