From: Christoph Lameter Subject: Allow override of definition for asm constant MIPS has a different way of defining asm constants which causes troubles for bounds.h generation. Add a new per arch CONFIG variable CONFIG_ASM_SYMBOL_PREFIX which can be set to define an alternate header for asm constant definitions. Use this for MIPS to make bounds determination work right. Signed-off-by: Christoph Lameter --- arch/mips/Kconfig | 7 +++++++ kernel/bounds.c | 11 ++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) Index: linux-2.6.25-rc8-mm1/arch/mips/Kconfig =================================================================== --- linux-2.6.25-rc8-mm1.orig/arch/mips/Kconfig 2008-04-02 20:37:35.646708781 -0700 +++ linux-2.6.25-rc8-mm1/arch/mips/Kconfig 2008-04-02 20:54:23.147529772 -0700 @@ -2033,6 +2033,13 @@ config I8253 config ZONE_DMA32 bool +# +# Used to override gas symbol setup in kernel/bounds.c. +# +config ASM_SYMBOL_PREFIX + string + default "@@@#define " + source "drivers/pcmcia/Kconfig" source "drivers/pci/hotplug/Kconfig" Index: linux-2.6.25-rc8-mm1/kernel/bounds.c =================================================================== --- linux-2.6.25-rc8-mm1.orig/kernel/bounds.c 2008-04-02 20:46:48.011931994 -0700 +++ linux-2.6.25-rc8-mm1/kernel/bounds.c 2008-04-02 20:55:46.408919496 -0700 @@ -9,8 +9,17 @@ #include #include +#ifdef CONFIG_ASM_SYMBOL_PREFIX +#define PREFIX CONFIG_ASM_SYMBOL_PREFIX +#else +/* + * Standard gas way of defining an asm symbol + */ +#define PREFIX "->" +#endif + #define DEFINE(sym, val) \ - asm volatile("\n->" #sym " %0 " #val : : "i" (val)) + asm volatile("\n" PREFIX #sym " %0 " : : "i" (val)) #define BLANK() asm volatile("\n->" : : )