diff options
author | Dmitry Adamushko <dmitry.adamushko@gmail.com> | 2008-08-19 18:16:13 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-08-20 06:18:55 -0400 |
commit | 8343ef2437c599d30568e6b5a257a40bf2f4902b (patch) | |
tree | d7d2dc700536b628aea8e85aca113869263dde09 /arch/x86/kernel/microcode_amd.c | |
parent | 636a31781684d0f49208aa163f1a5a3a74210eb4 (diff) |
x86-microcode: fix unbalanced use of get_cpu()
Don't use get_cpu() at all. Resort to checking a boot-up CPU (#0) in
microcode_{intel,amd}_module_init().
Signed-off-by: Dmitry Adamushko <dmitry.adamushko@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/microcode_amd.c')
-rw-r--r-- | arch/x86/kernel/microcode_amd.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/x86/kernel/microcode_amd.c b/arch/x86/kernel/microcode_amd.c index 33b2a217a8c5..a6e76ccf8158 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) |