diff options
author | Borislav Petkov <bp@suse.de> | 2017-01-20 15:29:50 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2017-01-23 04:02:49 -0500 |
commit | 7a93a40be23e5557934d773cc89b7b3627c08097 (patch) | |
tree | 231d10e8e8c01f16648965e7c25ce26086743408 | |
parent | 8cc26e0b4c49246564f773edbbefa3d5dc91d56e (diff) |
x86/microcode: Remove local vendor variable
Use x86_cpuid_vendor() directly.
No functionality change.
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: http://lkml.kernel.org/r/20170120202955.4091-12-bp@alien8.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | arch/x86/kernel/cpu/microcode/core.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c index 437996c9be67..dc54518299c4 100644 --- a/arch/x86/kernel/cpu/microcode/core.c +++ b/arch/x86/kernel/cpu/microcode/core.c | |||
@@ -122,15 +122,14 @@ bool get_builtin_firmware(struct cpio_data *cd, const char *name) | |||
122 | 122 | ||
123 | void __init load_ucode_bsp(void) | 123 | void __init load_ucode_bsp(void) |
124 | { | 124 | { |
125 | unsigned int vendor, cpuid_1_eax; | 125 | unsigned int cpuid_1_eax; |
126 | 126 | ||
127 | if (check_loader_disabled_bsp()) | 127 | if (check_loader_disabled_bsp()) |
128 | return; | 128 | return; |
129 | 129 | ||
130 | vendor = x86_cpuid_vendor(); | ||
131 | cpuid_1_eax = native_cpuid_eax(1); | 130 | cpuid_1_eax = native_cpuid_eax(1); |
132 | 131 | ||
133 | switch (vendor) { | 132 | switch (x86_cpuid_vendor()) { |
134 | case X86_VENDOR_INTEL: | 133 | case X86_VENDOR_INTEL: |
135 | if (x86_family(cpuid_1_eax) >= 6) | 134 | if (x86_family(cpuid_1_eax) >= 6) |
136 | load_ucode_intel_bsp(); | 135 | load_ucode_intel_bsp(); |
@@ -155,15 +154,14 @@ static bool check_loader_disabled_ap(void) | |||
155 | 154 | ||
156 | void load_ucode_ap(void) | 155 | void load_ucode_ap(void) |
157 | { | 156 | { |
158 | unsigned int vendor, cpuid_1_eax; | 157 | unsigned int cpuid_1_eax; |
159 | 158 | ||
160 | if (check_loader_disabled_ap()) | 159 | if (check_loader_disabled_ap()) |
161 | return; | 160 | return; |
162 | 161 | ||
163 | vendor = x86_cpuid_vendor(); | ||
164 | cpuid_1_eax = native_cpuid_eax(1); | 162 | cpuid_1_eax = native_cpuid_eax(1); |
165 | 163 | ||
166 | switch (vendor) { | 164 | switch (x86_cpuid_vendor()) { |
167 | case X86_VENDOR_INTEL: | 165 | case X86_VENDOR_INTEL: |
168 | if (x86_family(cpuid_1_eax) >= 6) | 166 | if (x86_family(cpuid_1_eax) >= 6) |
169 | load_ucode_intel_ap(); | 167 | load_ucode_intel_ap(); |