Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1c69524c2e5b83e52a098ebdeb4a8b52169f6a03
Commit:     1c69524c2e5b83e52a098ebdeb4a8b52169f6a03
Parent:     04e1ba852132c9ad006affcd5b8c8606295170b0
Author:     Yinghai Lu <[EMAIL PROTECTED]>
AuthorDate: Wed Jan 30 13:30:39 2008 +0100
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Wed Jan 30 13:30:39 2008 +0100

    x86: clear IO_APIC before enabing apic error vector.
    
    4 socket quad core, 8 socket quad core will do apic ID lifting for BSP.
    
    But io-apic regs for ExtINT still use 0 as dest.
    
    so when we enable apic error vector in BSP, we will get one APIC error.
    
    CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
    CPU: L2 Cache: 512K (64 bytes/line)
    CPU 0/4 -> Node 0
    CPU: Physical Processor ID: 1
    CPU: Processor Core ID: 0
    SMP alternatives: switching to UP code
    ACPI: Core revision 20070126
    enabled ExtINT on CPU#0
    ESR value after enabling vector: 00000000, after 0000000c
    APIC error on CPU0: 0c(08)
    ENABLING IO-APIC IRQs
    Synchronizing Arb IDs.
    
    So move enable_IO_APIC from setup_IO_APIC into setup_local_APIC and call it
    before enabling the ACPI error vector.
    
    [ tglx: arch/x86 adaptation ]
    
    Signed-off-by: Yinghai Lu <[EMAIL PROTECTED]>
    Signed-off-by: Andi Kleen <[EMAIL PROTECTED]>
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
    Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
---
 arch/x86/kernel/apic_64.c    |    7 +++++++
 arch/x86/kernel/io_apic_64.c |    7 +++++--
 include/asm-x86/hw_irq_64.h  |    1 +
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c
index 915808b..994298b 100644
--- a/arch/x86/kernel/apic_64.c
+++ b/arch/x86/kernel/apic_64.c
@@ -774,6 +774,13 @@ void __cpuinit setup_local_APIC(void)
                value = APIC_DM_NMI | APIC_LVT_MASKED;
        apic_write(APIC_LVT1, value);
 
+       /*
+        * Now enable IO-APICs, actually call clear_IO_APIC
+        * We need clear_IO_APIC before enabling vector on BP
+        */
+       if (!smp_processor_id() && !skip_ioapic_setup && nr_ioapics)
+               enable_IO_APIC();
+
        {
                unsigned oldvalue;
                maxlvt = lapic_get_maxlvt();
diff --git a/arch/x86/kernel/io_apic_64.c b/arch/x86/kernel/io_apic_64.c
index 3e471d0..4ef85a3 100644
--- a/arch/x86/kernel/io_apic_64.c
+++ b/arch/x86/kernel/io_apic_64.c
@@ -1172,7 +1172,7 @@ void __apicdebuginit print_PIC(void)
 
 #endif  /*  0  */
 
-static void __init enable_IO_APIC(void)
+void __init enable_IO_APIC(void)
 {
        union IO_APIC_reg_01 reg_01;
        int i8259_apic, i8259_pin;
@@ -1789,7 +1789,10 @@ __setup("no_timer_check", notimercheck);
 
 void __init setup_IO_APIC(void)
 {
-       enable_IO_APIC();
+
+       /*
+        * calling enable_IO_APIC() is moved to setup_local_APIC for BP
+        */
 
        if (acpi_ioapic)
                io_apic_irqs = ~0;      /* all IRQs go through IOAPIC */
diff --git a/include/asm-x86/hw_irq_64.h b/include/asm-x86/hw_irq_64.h
index a470d59..a346159 100644
--- a/include/asm-x86/hw_irq_64.h
+++ b/include/asm-x86/hw_irq_64.h
@@ -135,6 +135,7 @@ extern void init_8259A(int aeoi);
 extern void send_IPI_self(int vector);
 extern void init_VISWS_APIC_irqs(void);
 extern void setup_IO_APIC(void);
+extern void enable_IO_APIC(void);
 extern void disable_IO_APIC(void);
 extern void print_IO_APIC(void);
 extern int IO_APIC_get_PCI_irq_vector(int bus, int slot, int fn);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to