From e6126a58720ed8e53de93883c3f1572ad3d7b7c3 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Wed, 3 Dec 2014 17:36:57 +0900 Subject: [PATCH] x86: move arch-specific asmlinkage to 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 . If you want to override it with an arch-specific one, the best way is to add it to like Linux Kernel. Signed-off-by: Masahiro Yamada Cc: Simon Glass Tested-by: Simon Glass --- arch/x86/include/asm/arch-ivybridge/pei_data.h | 2 ++ arch/x86/include/asm/config.h | 1 - arch/x86/include/asm/linkage.h | 6 ++++++ arch/x86/lib/bios.c | 1 + arch/x86/lib/bios.h | 2 ++ include/common.h | 3 --- include/linux/linkage.h | 2 ++ 7 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 arch/x86/include/asm/linkage.h diff --git a/arch/x86/include/asm/arch-ivybridge/pei_data.h b/arch/x86/include/asm/arch-ivybridge/pei_data.h index 5026c8bab3..94533368ea 100644 --- a/arch/x86/include/asm/arch-ivybridge/pei_data.h +++ b/arch/x86/include/asm/arch-ivybridge/pei_data.h @@ -7,6 +7,8 @@ #ifndef ASM_ARCH_PEI_DATA_H #define ASM_ARCH_PEI_DATA_H +#include + struct pch_usb3_controller_settings { /* 0: Disable, 1: Enable, 2: Auto, 3: Smart Auto */ uint16_t mode; diff --git a/arch/x86/include/asm/config.h b/arch/x86/include/asm/config.h index c97d988f3b..ff15828a71 100644 --- a/arch/x86/include/asm/config.h +++ b/arch/x86/include/asm/config.h @@ -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 index 0000000000..bdca72eb6c --- /dev/null +++ b/arch/x86/include/asm/linkage.h @@ -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 */ diff --git a/arch/x86/lib/bios.c b/arch/x86/lib/bios.c index 298fca632c..d1f8933e12 100644 --- a/arch/x86/lib/bios.c +++ b/arch/x86/lib/bios.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/x86/lib/bios.h b/arch/x86/lib/bios.h index 8491b4acdd..668f4b5525 100644 --- a/arch/x86/lib/bios.h +++ b/arch/x86/lib/bios.h @@ -10,6 +10,8 @@ #ifndef _X86_LIB_BIOS_H #define _X86_LIB_BIOS_H +#include + #define REALMODE_BASE 0x600 #ifdef __ASSEMBLY__ diff --git a/include/common.h b/include/common.h index 46f07fe173..4f2f303f33 100644 --- a/include/common.h +++ b/include/common.h @@ -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 #endif diff --git a/include/linux/linkage.h b/include/linux/linkage.h index 7435fcd026..5797498adc 100644 --- a/include/linux/linkage.h +++ b/include/linux/linkage.h @@ -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 -- 2.30.2