]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86: do_boot_cpu - check if we have ESR register
authorCyrill Gorcunov <gorcunov@gmail.com>
Wed, 22 Oct 2008 14:00:09 +0000 (18:00 +0400)
committerIngo Molnar <mingo@elte.hu>
Wed, 22 Oct 2008 14:56:16 +0000 (16:56 +0200)
Impact: fix APIC IRQ irregularities on certain older boxes

We should touch the APIC ESR register if only we have it.

The patch fixes the problem mentioned by Max Kellermann:

http://lkml.org/lkml/2008/10/17/147

Bisected-by: Max Kellermann <mk@cm4all.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
[ mingo@elte.hu: build fix ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/smpboot.c

index 7ece815ea637497355a63ba90b218ef5536d57a0..7b1093397319766b2e4848a5a883b0dc35f49804 100644 (file)
@@ -893,9 +893,11 @@ do_rest:
                smpboot_setup_warm_reset_vector(start_ip);
                /*
                 * Be paranoid about clearing APIC errors.
-               */
-               apic_write(APIC_ESR, 0);
-               apic_read(APIC_ESR);
+               */
+               if (APIC_INTEGRATED(apic_version[boot_cpu_physical_apicid])) {
+                       apic_write(APIC_ESR, 0);
+                       apic_read(APIC_ESR);
+               }
        }
 
        /*