]> git.sur5r.net Git - u-boot/commitdiff
x86: move arch-specific asmlinkage to <asm/linkage.h>
authorMasahiro Yamada <yamada.m@jp.panasonic.com>
Wed, 3 Dec 2014 08:36:57 +0000 (17:36 +0900)
committerSimon Glass <sjg@chromium.org>
Mon, 15 Dec 2014 14:22:53 +0000 (07:22 -0700)
Commit 65dd74a674d6 (x86: ivybridge: Implement SDRAM init) introduced
x86-specific asmlinkage into arch/x86/include/asm/config.h.

Commit ed0a2fbf14f7 (x86: Add a definition of asmlinkage) added the
same macro define again, this time, into include/common.h.
(Please do not add arch-specific stuff to include/common.h any more;
it is already too cluttered.)

The generic asmlinkage is defined in <linux/linkage.h>.  If you want
to override it with an arch-specific one, the best way is to add it
to <asm/linkage.h> like Linux Kernel.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
arch/x86/include/asm/arch-ivybridge/pei_data.h
arch/x86/include/asm/config.h
arch/x86/include/asm/linkage.h [new file with mode: 0644]
arch/x86/lib/bios.c
arch/x86/lib/bios.h
include/common.h
include/linux/linkage.h

index 5026c8bab317002e9987bdc96a534d067318511d..94533368ea95e115e67479976db63a1eff2107ab 100644 (file)
@@ -7,6 +7,8 @@
 #ifndef ASM_ARCH_PEI_DATA_H
 #define ASM_ARCH_PEI_DATA_H
 
+#include <linux/linkage.h>
+
 struct pch_usb3_controller_settings {
        /* 0: Disable, 1: Enable, 2: Auto, 3: Smart Auto */
        uint16_t mode;
index c97d988f3be87c42fb8588a94f0824ba61fec7fb..ff15828a713de5d1258aada2dc5aa599734ca900 100644 (file)
@@ -10,6 +10,5 @@
 #define CONFIG_SYS_GENERIC_BOARD
 #define CONFIG_LMB
 #define CONFIG_SYS_BOOT_RAMDISK_HIGH
-#define asmlinkage __attribute__((regparm(0)))
 
 #endif
diff --git a/arch/x86/include/asm/linkage.h b/arch/x86/include/asm/linkage.h
new file mode 100644 (file)
index 0000000..bdca72e
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _ASM_X86_LINKAGE_H
+#define _ASM_X86_LINKAGE_H
+
+#define asmlinkage CPP_ASMLINKAGE __attribute__((regparm(0)))
+
+#endif /* _ASM_X86_LINKAGE_H */
index 298fca632c9e62ca080b0066b69f173765986e13..d1f8933e120497c63973bd9f4e6327fada3202fe 100644 (file)
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <bios_emul.h>
 #include <vbe.h>
+#include <linux/linkage.h>
 #include <asm/cache.h>
 #include <asm/processor.h>
 #include <asm/i8259.h>
index 8491b4acdd4c5688246465433f7884d394c67aa5..668f4b55254d22fe709c7fd68395db74ee3e269d 100644 (file)
@@ -10,6 +10,8 @@
 #ifndef _X86_LIB_BIOS_H
 #define _X86_LIB_BIOS_H
 
+#include <linux/linkage.h>
+
 #define REALMODE_BASE          0x600
 
 #ifdef __ASSEMBLY__
index 46f07fe1739d4184f2dc0841adfc231ccda495cf..4f2f303f33647c003ac295ef1af08839d94457ee 100644 (file)
@@ -73,9 +73,6 @@ typedef volatile unsigned char        vu_char;
 #ifdef CONFIG_ARM
 #define asmlinkage     /* nothing */
 #endif
-#ifdef CONFIG_X86
-#define asmlinkage __attribute__((regparm(0)))
-#endif
 #ifdef CONFIG_BLACKFIN
 #include <asm/blackfin.h>
 #endif
index 7435fcd0262bd4770159e1bd3ebf6d5a9444a54f..5797498adceceb48c5368d91c3155a59daadb094 100644 (file)
@@ -17,7 +17,9 @@
 #define CPP_ASMLINKAGE
 #endif
 
+#ifndef asmlinkage
 #define asmlinkage CPP_ASMLINKAGE
+#endif
 
 #define SYMBOL_NAME_STR(X)     #X
 #define SYMBOL_NAME(X)         X