diff options
author | Dave Martin <dave.martin@linaro.org> | 2011-02-25 11:54:52 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-02-26 08:36:06 -0500 |
commit | 80f0aad77f3e1e9d9e518b09ac46963d628ae2be (patch) | |
tree | df195fff207483f4b10520ebcd3a500c1f703364 /arch/arm | |
parent | 3572bea8cbc57f0bef1e0f4580c01717df7026d8 (diff) |
ARM: 6766/1: Thumb-2: Reflect ARM/Thumb-2 configuration in module vermagic
Loading Thumb-2 modules into an ARM kernel or vice-versa isn't
guaranteed to work safely, since the kernel is not interworking-
aware everywhere.
This patch adds "thumb2" to the module vermagic when
CONFIG_THUMB2_KERNEL is enabled, to help avoid accidental loading
of modules into the wrong kernel.
Signed-off-by: Dave Martin <dave.martin@linaro.org>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/include/asm/module.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/include/asm/module.h b/arch/arm/include/asm/module.h index a2b775b81cfa..543b44916d2c 100644 --- a/arch/arm/include/asm/module.h +++ b/arch/arm/include/asm/module.h | |||
@@ -40,8 +40,16 @@ struct mod_arch_specific { | |||
40 | #define MODULE_ARCH_VERMAGIC_P2V "" | 40 | #define MODULE_ARCH_VERMAGIC_P2V "" |
41 | #endif | 41 | #endif |
42 | 42 | ||
43 | /* Add instruction set architecture tag to distinguish ARM/Thumb kernels */ | ||
44 | #ifdef CONFIG_THUMB2_KERNEL | ||
45 | #define MODULE_ARCH_VERMAGIC_ARMTHUMB "thumb2 " | ||
46 | #else | ||
47 | #define MODULE_ARCH_VERMAGIC_ARMTHUMB "" | ||
48 | #endif | ||
49 | |||
43 | #define MODULE_ARCH_VERMAGIC \ | 50 | #define MODULE_ARCH_VERMAGIC \ |
44 | MODULE_ARCH_VERMAGIC_ARMVSN \ | 51 | MODULE_ARCH_VERMAGIC_ARMVSN \ |
52 | MODULE_ARCH_VERMAGIC_ARMTHUMB \ | ||
45 | MODULE_ARCH_VERMAGIC_P2V | 53 | MODULE_ARCH_VERMAGIC_P2V |
46 | 54 | ||
47 | #endif /* _ASM_ARM_MODULE_H */ | 55 | #endif /* _ASM_ARM_MODULE_H */ |