]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
x86, microcode, amd: Fix warnings and errors on with CONFIG_MICROCODE=m
authorJacob Shin <jacob.shin@amd.com>
Fri, 31 May 2013 06:53:24 +0000 (01:53 -0500)
committerH. Peter Anvin <hpa@linux.intel.com>
Fri, 31 May 2013 20:56:58 +0000 (13:56 -0700)
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>
arch/x86/Kconfig
arch/x86/include/asm/microcode_amd.h
arch/x86/kernel/microcode_amd_early.c

index 28dba52af514eac749cec5986c422c44306cd740..2705532662975f5363fb42b0b11f5395b1fb1596 100644 (file)
@@ -1065,7 +1065,7 @@ config MICROCODE_AMD_EARLY
 
 config MICROCODE_EARLY
        bool "Early load microcode"
-       depends on (MICROCODE_INTEL || MICROCODE_AMD) && BLK_DEV_INITRD
+       depends on MICROCODE=y && BLK_DEV_INITRD
        select MICROCODE_INTEL_EARLY if MICROCODE_INTEL
        select MICROCODE_AMD_EARLY if MICROCODE_AMD
        default y
index 24254aaa857ff1e8382d99429c58dccc76a24ffe..c6b043f402712f069006d2b73c4d8299b0701245 100644 (file)
@@ -64,7 +64,7 @@ extern enum ucode_state load_microcode_amd(int cpu, const u8 *data, size_t size)
 #ifdef CONFIG_MICROCODE_AMD_EARLY
 #ifdef CONFIG_X86_32
 #define MPB_MAX_SIZE PAGE_SIZE
-extern u8 __cpuinitdata amd_bsp_mpb[MPB_MAX_SIZE];
+extern u8 amd_bsp_mpb[MPB_MAX_SIZE];
 #endif
 extern void __init load_ucode_amd_bsp(void);
 extern void __cpuinit load_ucode_amd_ap(void);
index 7e54d97c714a152b0568762f919d4be47ce7206f..9618805ce6d7836714f19b989429a2adc023f8ec 100644 (file)
@@ -21,9 +21,9 @@ static u32 ucode_new_rev;
  * Microcode patch container file is prepended to the initrd in cpio format.
  * See Documentation/x86/early-microcode.txt
  */
-static __initdata char ucode_path[] = "kernel/x86/microcode/AuthenticAMD.bin";
+static __cpuinitdata char ucode_path[] = "kernel/x86/microcode/AuthenticAMD.bin";
 
-static struct cpio_data __init find_ucode_in_initrd(void)
+static struct cpio_data __cpuinit find_ucode_in_initrd(void)
 {
        long offset = 0;
        struct cpio_data cd;
@@ -62,7 +62,7 @@ static struct cpio_data __init find_ucode_in_initrd(void)
  * load_microcode_amd() to save equivalent cpu table and microcode patches in
  * kernel heap memory.
  */
-static void __init apply_ucode_in_initrd(void)
+static void __cpuinit apply_ucode_in_initrd(void)
 {
        struct cpio_data cd;
        struct equiv_cpu_entry *eq;
@@ -133,7 +133,7 @@ void __init load_ucode_amd_bsp(void)
 }
 
 #ifdef CONFIG_X86_32
-u8 __cpuinitdata amd_bsp_mpb[MPB_MAX_SIZE];
+u8 amd_bsp_mpb[MPB_MAX_SIZE];
 
 /*
  * On 32-bit, since AP's early load occurs before paging is turned on, we