diff options
author | Andi Kleen <ak@linux.intel.com> | 2012-01-25 18:09:13 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2012-01-26 19:49:07 -0500 |
commit | 78ff123b05fb15beb1ad670372eea0d299d0b8af (patch) | |
tree | ff89146ab03a07e4e7ac490ed504508e689e462b /arch/x86/kernel/microcode_core.c | |
parent | fa8031aefec0cf7ea6c2387c93610d99d9659aa2 (diff) |
x86: autoload microcode driver on Intel and AMD systems v2
Don't try to describe the actual models for now.
v2: Fix typo: X86_VENDOR_ANY -> X86_FAMILY_ANY (trenn)
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Thomas Renninger <trenn@suse.de>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/x86/kernel/microcode_core.c')
-rw-r--r-- | arch/x86/kernel/microcode_core.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/x86/kernel/microcode_core.c b/arch/x86/kernel/microcode_core.c index fda91c307104..87a0f8688301 100644 --- a/arch/x86/kernel/microcode_core.c +++ b/arch/x86/kernel/microcode_core.c | |||
@@ -86,6 +86,7 @@ | |||
86 | 86 | ||
87 | #include <asm/microcode.h> | 87 | #include <asm/microcode.h> |
88 | #include <asm/processor.h> | 88 | #include <asm/processor.h> |
89 | #include <asm/cpu_device_id.h> | ||
89 | 90 | ||
90 | MODULE_DESCRIPTION("Microcode Update Driver"); | 91 | MODULE_DESCRIPTION("Microcode Update Driver"); |
91 | MODULE_AUTHOR("Tigran Aivazian <tigran@aivazian.fsnet.co.uk>"); | 92 | MODULE_AUTHOR("Tigran Aivazian <tigran@aivazian.fsnet.co.uk>"); |
@@ -504,6 +505,20 @@ static struct notifier_block __refdata mc_cpu_notifier = { | |||
504 | .notifier_call = mc_cpu_callback, | 505 | .notifier_call = mc_cpu_callback, |
505 | }; | 506 | }; |
506 | 507 | ||
508 | #ifdef MODULE | ||
509 | /* Autoload on Intel and AMD systems */ | ||
510 | static const struct x86_cpu_id microcode_id[] = { | ||
511 | #ifdef CONFIG_MICROCODE_INTEL | ||
512 | { X86_VENDOR_INTEL, X86_FAMILY_ANY, X86_MODEL_ANY, }, | ||
513 | #endif | ||
514 | #ifdef CONFIG_MICROCODE_AMD | ||
515 | { X86_VENDOR_AMD, X86_FAMILY_ANY, X86_MODEL_ANY, }, | ||
516 | #endif | ||
517 | {} | ||
518 | }; | ||
519 | MODULE_DEVICE_TABLE(x86cpu, microcode_id); | ||
520 | #endif | ||
521 | |||
507 | static int __init microcode_init(void) | 522 | static int __init microcode_init(void) |
508 | { | 523 | { |
509 | struct cpuinfo_x86 *c = &cpu_data(0); | 524 | struct cpuinfo_x86 *c = &cpu_data(0); |