diff options
| author | Borislav Petkov <bp@suse.de> | 2016-02-03 06:33:31 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2016-02-09 05:41:15 -0500 |
| commit | e8c8165ecfb1cfd6650777c193361d33b0f7f59e (patch) | |
| tree | 315548831c7fa011e96b79528488097c9b16eb09 /arch/x86/kernel/cpu/microcode | |
| parent | 264285ac01673e70557c43ecee338ce97c4c0672 (diff) | |
x86/microcode: Remove redundant __setup() param parsing
We do parse for the disable microcode loader chicken bit very early.
After the driver merge, the __setup() param parsing method is not needed
anymore so get rid of it.
In addition, fix a compiler warning from an old SLES11 gcc (4.3.4)
reported by Jan Beulich <jbeulich@suse.com>:
arch/x86/kernel/cpu/microcode/core.c: In function ‘load_ucode_bsp’:
arch/x86/kernel/cpu/microcode/core.c:96: warning: array subscript is above array bounds
Tested-by: Thomas Voegtle <tv@lio96.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1454499225-21544-4-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/cpu/microcode')
| -rw-r--r-- | arch/x86/kernel/cpu/microcode/core.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c index faec7120c508..bca4e48b531d 100644 --- a/arch/x86/kernel/cpu/microcode/core.c +++ b/arch/x86/kernel/cpu/microcode/core.c | |||
| @@ -43,16 +43,8 @@ | |||
| 43 | #define MICROCODE_VERSION "2.01" | 43 | #define MICROCODE_VERSION "2.01" |
| 44 | 44 | ||
| 45 | static struct microcode_ops *microcode_ops; | 45 | static struct microcode_ops *microcode_ops; |
| 46 | |||
| 47 | static bool dis_ucode_ldr; | 46 | static bool dis_ucode_ldr; |
| 48 | 47 | ||
| 49 | static int __init disable_loader(char *str) | ||
| 50 | { | ||
| 51 | dis_ucode_ldr = true; | ||
| 52 | return 1; | ||
| 53 | } | ||
| 54 | __setup("dis_ucode_ldr", disable_loader); | ||
| 55 | |||
| 56 | /* | 48 | /* |
| 57 | * Synchronization. | 49 | * Synchronization. |
| 58 | * | 50 | * |
| @@ -81,15 +73,16 @@ struct cpu_info_ctx { | |||
| 81 | 73 | ||
| 82 | static bool __init check_loader_disabled_bsp(void) | 74 | static bool __init check_loader_disabled_bsp(void) |
| 83 | { | 75 | { |
| 76 | static const char *__dis_opt_str = "dis_ucode_ldr"; | ||
| 77 | |||
| 84 | #ifdef CONFIG_X86_32 | 78 | #ifdef CONFIG_X86_32 |
| 85 | const char *cmdline = (const char *)__pa_nodebug(boot_command_line); | 79 | const char *cmdline = (const char *)__pa_nodebug(boot_command_line); |
| 86 | const char *opt = "dis_ucode_ldr"; | 80 | const char *option = (const char *)__pa_nodebug(__dis_opt_str); |
| 87 | const char *option = (const char *)__pa_nodebug(opt); | ||
| 88 | bool *res = (bool *)__pa_nodebug(&dis_ucode_ldr); | 81 | bool *res = (bool *)__pa_nodebug(&dis_ucode_ldr); |
| 89 | 82 | ||
| 90 | #else /* CONFIG_X86_64 */ | 83 | #else /* CONFIG_X86_64 */ |
| 91 | const char *cmdline = boot_command_line; | 84 | const char *cmdline = boot_command_line; |
| 92 | const char *option = "dis_ucode_ldr"; | 85 | const char *option = __dis_opt_str; |
| 93 | bool *res = &dis_ucode_ldr; | 86 | bool *res = &dis_ucode_ldr; |
| 94 | #endif | 87 | #endif |
| 95 | 88 | ||
