From: Cyrill Gorcunov Date: Fri, 15 Aug 2008 11:51:22 +0000 (+0200) Subject: x86: apic - unify verify_local_APIC X-Git-Tag: v2.6.28-rc1~711^2~1^2~27 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=c93baa1ae51cdba25a5f5ad37b2348e700e75daf;p=linux-2.6-omap-h63xx.git x86: apic - unify verify_local_APIC Signed-off-by: Cyrill Gorcunov Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c index 7783c113be2..7ef7c782a42 100644 --- a/arch/x86/kernel/apic_32.c +++ b/arch/x86/kernel/apic_32.c @@ -878,6 +878,12 @@ int __init verify_local_APIC(void) */ reg0 = apic_read(APIC_ID); apic_printk(APIC_DEBUG, "Getting ID: %x\n", reg0); + apic_write(APIC_ID, reg0 ^ APIC_ID_MASK); + reg1 = apic_read(APIC_ID); + apic_printk(APIC_DEBUG, "Getting ID: %x\n", reg1); + apic_write(APIC_ID, reg0); + if (reg1 != (reg0 ^ APIC_ID_MASK)) + return 0; /* * The next two are just to see if we have sane values.