diff options
| author | Jacob Shin <jacob.shin@amd.com> | 2013-05-31 02:53:24 -0400 |
|---|---|---|
| committer | H. Peter Anvin <hpa@linux.intel.com> | 2013-05-31 16:56:58 -0400 |
| commit | 6b3389ac21b5e557b957f1497d0ff22bf733e8c3 (patch) | |
| tree | 2615ccf0fd22eea72e71de9c3e7d7c70ae167eaf | |
| parent | 757885e94a22bcc82beb9b1445c95218cb20ceab (diff) | |
x86, microcode, amd: Fix warnings and errors on with CONFIG_MICROCODE=m
Fix section mismatch warnings on microcode_amd_early.
Compile error occurs when CONFIG_MICROCODE=m, change so that early
loading depends on microcode_core.
Reported-by: Yinghai Lu <yinghai@kernel.org>
Reported-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Jacob Shin <jacob.shin@amd.com>
Link: http://lkml.kernel.org/r/20130531150241.GA12006@jshin-Toonie
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
| -rw-r--r-- | arch/x86/Kconfig | 2 | ||||
| -rw-r--r-- | arch/x86/include/asm/microcode_amd.h | 2 | ||||
| -rw-r--r-- | arch/x86/kernel/microcode_amd_early.c | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 28dba52af514..270553266297 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
| @@ -1065,7 +1065,7 @@ config MICROCODE_AMD_EARLY | |||
| 1065 | 1065 | ||
| 1066 | config MICROCODE_EARLY | 1066 | config MICROCODE_EARLY |
| 1067 | bool "Early load microcode" | 1067 | bool "Early load microcode" |
| 1068 | depends on (MICROCODE_INTEL || MICROCODE_AMD) && BLK_DEV_INITRD | 1068 | depends on MICROCODE=y && BLK_DEV_INITRD |
| 1069 | select MICROCODE_INTEL_EARLY if MICROCODE_INTEL | 1069 | select MICROCODE_INTEL_EARLY if MICROCODE_INTEL |
| 1070 | select MICROCODE_AMD_EARLY if MICROCODE_AMD | 1070 | select MICROCODE_AMD_EARLY if MICROCODE_AMD |
| 1071 | default y | 1071 | default y |
diff --git a/arch/x86/include/asm/microcode_amd.h b/arch/x86/include/asm/microcode_amd.h index 24254aaa857f..c6b043f40271 100644 --- a/arch/x86/include/asm/microcode_amd.h +++ b/arch/x86/include/asm/microcode_amd.h | |||
| @@ -64,7 +64,7 @@ extern enum ucode_state load_microcode_amd(int cpu, const u8 *data, size_t size) | |||
| 64 | #ifdef CONFIG_MICROCODE_AMD_EARLY | 64 | #ifdef CONFIG_MICROCODE_AMD_EARLY |
| 65 | #ifdef CONFIG_X86_32 | 65 | #ifdef CONFIG_X86_32 |
| 66 | #define MPB_MAX_SIZE PAGE_SIZE | 66 | #define MPB_MAX_SIZE PAGE_SIZE |
| 67 | extern u8 __cpuinitdata amd_bsp_mpb[MPB_MAX_SIZE]; | 67 | extern u8 amd_bsp_mpb[MPB_MAX_SIZE]; |
| 68 | #endif | 68 | #endif |
| 69 | extern void __init load_ucode_amd_bsp(void); | 69 | extern void __init load_ucode_amd_bsp(void); |
| 70 | extern void __cpuinit load_ucode_amd_ap(void); | 70 | extern void __cpuinit load_ucode_amd_ap(void); |
diff --git a/arch/x86/kernel/microcode_amd_early.c b/arch/x86/kernel/microcode_amd_early.c index 7e54d97c714a..9618805ce6d7 100644 --- a/arch/x86/kernel/microcode_amd_early.c +++ b/arch/x86/kernel/microcode_amd_early.c | |||
| @@ -21,9 +21,9 @@ static u32 ucode_new_rev; | |||
| 21 | * Microcode patch container file is prepended to the initrd in cpio format. | 21 | * Microcode patch container file is prepended to the initrd in cpio format. |
| 22 | * See Documentation/x86/early-microcode.txt | 22 | * See Documentation/x86/early-microcode.txt |
| 23 | */ | 23 | */ |
| 24 | static __initdata char ucode_path[] = "kernel/x86/microcode/AuthenticAMD.bin"; | 24 | static __cpuinitdata char ucode_path[] = "kernel/x86/microcode/AuthenticAMD.bin"; |
| 25 | 25 | ||
| 26 | static struct cpio_data __init find_ucode_in_initrd(void) | 26 | static struct cpio_data __cpuinit find_ucode_in_initrd(void) |
| 27 | { | 27 | { |
| 28 | long offset = 0; | 28 | long offset = 0; |
| 29 | struct cpio_data cd; | 29 | struct cpio_data cd; |
| @@ -62,7 +62,7 @@ static struct cpio_data __init find_ucode_in_initrd(void) | |||
| 62 | * load_microcode_amd() to save equivalent cpu table and microcode patches in | 62 | * load_microcode_amd() to save equivalent cpu table and microcode patches in |
| 63 | * kernel heap memory. | 63 | * kernel heap memory. |
| 64 | */ | 64 | */ |
| 65 | static void __init apply_ucode_in_initrd(void) | 65 | static void __cpuinit apply_ucode_in_initrd(void) |
| 66 | { | 66 | { |
| 67 | struct cpio_data cd; | 67 | struct cpio_data cd; |
| 68 | struct equiv_cpu_entry *eq; | 68 | struct equiv_cpu_entry *eq; |
| @@ -133,7 +133,7 @@ void __init load_ucode_amd_bsp(void) | |||
| 133 | } | 133 | } |
| 134 | 134 | ||
| 135 | #ifdef CONFIG_X86_32 | 135 | #ifdef CONFIG_X86_32 |
| 136 | u8 __cpuinitdata amd_bsp_mpb[MPB_MAX_SIZE]; | 136 | u8 amd_bsp_mpb[MPB_MAX_SIZE]; |
| 137 | 137 | ||
| 138 | /* | 138 | /* |
| 139 | * On 32-bit, since AP's early load occurs before paging is turned on, we | 139 | * On 32-bit, since AP's early load occurs before paging is turned on, we |
