diff options
-rw-r--r-- | arch/x86/kernel/microcode_amd.c | 10 | ||||
-rw-r--r-- | arch/x86/kernel/microcode_intel.c | 10 |
2 files changed, 12 insertions, 8 deletions
diff --git a/arch/x86/kernel/microcode_amd.c b/arch/x86/kernel/microcode_amd.c index 33b2a217a8c..a6e76ccf815 100644 --- a/arch/x86/kernel/microcode_amd.c +++ b/arch/x86/kernel/microcode_amd.c | |||
@@ -500,13 +500,15 @@ static struct microcode_ops microcode_amd_ops = { | |||
500 | 500 | ||
501 | static int __init microcode_amd_module_init(void) | 501 | static int __init microcode_amd_module_init(void) |
502 | { | 502 | { |
503 | struct cpuinfo_x86 *c = &cpu_data(get_cpu()); | 503 | struct cpuinfo_x86 *c = &cpu_data(0); |
504 | 504 | ||
505 | equiv_cpu_table = NULL; | 505 | equiv_cpu_table = NULL; |
506 | if (c->x86_vendor == X86_VENDOR_AMD) | 506 | if (c->x86_vendor != X86_VENDOR_AMD) { |
507 | return microcode_init(µcode_amd_ops, THIS_MODULE); | 507 | printk(KERN_ERR "microcode: CPU platform is not AMD-capable\n"); |
508 | else | ||
509 | return -ENODEV; | 508 | return -ENODEV; |
509 | } | ||
510 | |||
511 | return microcode_init(µcode_amd_ops, THIS_MODULE); | ||
510 | } | 512 | } |
511 | 513 | ||
512 | static void __exit microcode_amd_module_exit(void) | 514 | static void __exit microcode_amd_module_exit(void) |
diff --git a/arch/x86/kernel/microcode_intel.c b/arch/x86/kernel/microcode_intel.c index d2d9d74f4cb..6dd8907ff22 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 = { | |||
531 | 531 | ||
532 | static int __init microcode_intel_module_init(void) | 532 | static int __init microcode_intel_module_init(void) |
533 | { | 533 | { |
534 | struct cpuinfo_x86 *c = &cpu_data(get_cpu()); | 534 | struct cpuinfo_x86 *c = &cpu_data(0); |
535 | 535 | ||
536 | if (c->x86_vendor == X86_VENDOR_INTEL) | 536 | if (c->x86_vendor != X86_VENDOR_INTEL) { |
537 | return microcode_init(µcode_intel_ops, THIS_MODULE); | 537 | printk(KERN_ERR "microcode: CPU platform is not Intel-capable\n"); |
538 | else | ||
539 | return -ENODEV; | 538 | return -ENODEV; |
539 | } | ||
540 | |||
541 | return microcode_init(µcode_intel_ops, THIS_MODULE); | ||
540 | } | 542 | } |
541 | 543 | ||
542 | static void __exit microcode_intel_module_exit(void) | 544 | static void __exit microcode_intel_module_exit(void) |