Bläddra i källkod

[ARM] 3111/2: old ABI compat: adjust NWFPE to be operational within an EABI kernel

Patch from Nicolas Pitre

We need NWFPE if we want to support execution of legacy binaries with
an EABI kernel.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Nicolas Pitre 19 år sedan
förälder
incheckning
8993a44ced
2 ändrade filer med 4 tillägg och 4 borttagningar
  1. 2 2
      arch/arm/Kconfig
  2. 2 2
      arch/arm/nwfpe/fpa11.h

+ 2 - 2
arch/arm/Kconfig

@@ -602,7 +602,7 @@ comment "At least one emulation must be selected"
 
 
 config FPE_NWFPE
 config FPE_NWFPE
 	bool "NWFPE math emulation"
 	bool "NWFPE math emulation"
-	depends on !AEABI
+	depends on !AEABI || OABI_COMPAT
 	---help---
 	---help---
 	  Say Y to include the NWFPE floating point emulator in the kernel.
 	  Say Y to include the NWFPE floating point emulator in the kernel.
 	  This is necessary to run most binaries. Linux does not currently
 	  This is necessary to run most binaries. Linux does not currently
@@ -626,7 +626,7 @@ config FPE_NWFPE_XP
 
 
 config FPE_FASTFPE
 config FPE_FASTFPE
 	bool "FastFPE math emulation (EXPERIMENTAL)"
 	bool "FastFPE math emulation (EXPERIMENTAL)"
-	depends on !AEABI && !CPU_32v3 && EXPERIMENTAL
+	depends on (!AEABI || OABI_COMPAT) && !CPU_32v3 && EXPERIMENTAL
 	---help---
 	---help---
 	  Say Y here to include the FAST floating point emulator in the kernel.
 	  Say Y here to include the FAST floating point emulator in the kernel.
 	  This is an experimental much faster emulator which now also has full
 	  This is an experimental much faster emulator which now also has full

+ 2 - 2
arch/arm/nwfpe/fpa11.h

@@ -62,7 +62,7 @@ typedef union tagFPREG {
 #else
 #else
 	u32 padding[3];
 	u32 padding[3];
 #endif
 #endif
-} FPREG;
+} __attribute__ ((packed,aligned(4))) FPREG;
 
 
 /*
 /*
  * FPA11 device model.
  * FPA11 device model.
@@ -89,7 +89,7 @@ typedef struct tagFPA11 {
 				   so we can use it to detect whether this
 				   so we can use it to detect whether this
 				   instance of the emulator needs to be
 				   instance of the emulator needs to be
 				   initialised. */
 				   initialised. */
-} FPA11;
+} __attribute__ ((packed,aligned(4))) FPA11;
 
 
 extern int8 SetRoundingMode(const unsigned int);
 extern int8 SetRoundingMode(const unsigned int);
 extern int8 SetRoundingPrecision(const unsigned int);
 extern int8 SetRoundingPrecision(const unsigned int);