]> err.no Git - linux-2.6/commitdiff
[PATCH] KVM: Use boot_cpu_data instead of current_cpu_data
authorAvi Kivity <avi@qumranet.com>
Sat, 30 Dec 2006 00:49:34 +0000 (16:49 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Sat, 30 Dec 2006 18:56:43 +0000 (10:56 -0800)
current_cpu_data invokes smp_processor_id(), which is inadvisable when
preemption is enabled.  Switch to boot_cpu_data instead.

Resolves sourceforge bug 1621401.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/kvm/svm.c

index 9ec87636ded6dc0b9f5efd42d9f5e25f38680f43..283024ab3ba00e7ca718e9db00346b533f1f69ed 100644 (file)
@@ -246,7 +246,7 @@ static int has_svm(void)
 {
        uint32_t eax, ebx, ecx, edx;
 
-       if (current_cpu_data.x86_vendor != X86_VENDOR_AMD) {
+       if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD) {
                printk(KERN_INFO "has_svm: not amd\n");
                return 0;
        }