summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/microcode_intel.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/microcode_intel.c')
-rw-r--r--arch/x86/kernel/microcode_intel.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/x86/kernel/microcode_intel.c b/arch/x86/kernel/microcode_intel.c
index d2d9d74..6dd8907 100644
--- a/arch/x86/kernel/microcode_intel.c
+++ b/arch/x86/kernel/microcode_intel.c
@@ -531,12 +531,14 @@ static struct microcode_ops microcode_intel_ops = {
static int __init microcode_intel_module_init(void)
{
- struct cpuinfo_x86 *c = &cpu_data(get_cpu());
+ struct cpuinfo_x86 *c = &cpu_data(0);
- if (c->x86_vendor == X86_VENDOR_INTEL)
- return microcode_init(&microcode_intel_ops, THIS_MODULE);
- else
+ if (c->x86_vendor != X86_VENDOR_INTEL) {
+ printk(KERN_ERR "microcode: CPU platform is not Intel-capable\n");
return -ENODEV;
+ }
+
+ return microcode_init(&microcode_intel_ops, THIS_MODULE);
}
static void __exit microcode_intel_module_exit(void)
OpenPOWER on IntegriCloud