diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-02-24 00:12:35 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-02-24 00:12:35 +0000 |
commit | 482368b1a8e45430672c58c9a42e7d2004367126 (patch) | |
tree | ce2a1a567d4d62dee7c2e71a46a99cf72cf1d606 /arch/i386/kernel/io_apic.c | |
parent | e4d0251c6f56ab2e191afb70f80f382793e23f74 (diff) |
Merge with 2.3.47. Guys, this is buggy as shit. You've been warned.
Diffstat (limited to 'arch/i386/kernel/io_apic.c')
-rw-r--r-- | arch/i386/kernel/io_apic.c | 51 |
1 files changed, 14 insertions, 37 deletions
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c index 0037bebdd..75b2bfb9f 100644 --- a/arch/i386/kernel/io_apic.c +++ b/arch/i386/kernel/io_apic.c @@ -11,6 +11,9 @@ * Hidemi Kishimoto <kisimoto@css1.kbnes.nec.co.jp>, * further tested and cleaned up by Zach Brown <zab@redhat.com> * and Ingo Molnar <mingo@redhat.com> + * + * Fixes + * Maciej W. Rozycki : Bits for genuine 82489DX APICs */ #include <linux/mm.h> @@ -249,7 +252,7 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pci_pin) best_guess = irq; } } - return -1; + return best_guess; } /* @@ -906,40 +909,6 @@ void disable_IO_APIC(void) } } -static void __init setup_ioapic_default_id(void) -{ - struct IO_APIC_reg_00 reg_00; - - /* - * 'default' mptable configurations mean a hardwired setup, - * 2 CPUs, 16 APIC registers. IO-APIC ID is usually set to 0, - * setting it to ID 2 should be fine. - */ - - /* - * Sanity check, is ID 2 really free? Every APIC in the - * system must have a unique ID or we get lots of nice - * 'stuck on smp_invalidate_needed IPI wait' messages. - */ - if (phys_cpu_present_map & (1<<0x2)) - panic("APIC ID 2 already used"); - - /* - * Set the ID - */ - *(int *)®_00 = io_apic_read(0, 0); - printk("...changing IO-APIC physical APIC ID to 2...\n"); - reg_00.ID = 0x2; - io_apic_write(0, 0, *(int *)®_00); - - /* - * Sanity check - */ - *(int *)®_00 = io_apic_read(0, 0); - if (reg_00.ID != 0x2) - panic("could not set ID"); -} - /* * function to set the IO-APIC physical IDs based on the * values stored in the MPC table. @@ -967,6 +936,15 @@ static void __init setup_ioapic_ids_from_mpc (void) printk("...changing IO-APIC physical APIC ID to %d ...", mp_ioapics[apic].mpc_apicid); + /* + * Sanity check, is the ID really free? Every APIC in the + * system must have a unique ID or we get lots of nice + * 'stuck on smp_invalidate_needed IPI wait' messages. + */ + if (phys_cpu_present_map & (1<<mp_ioapics[apic].mpc_apicid)) + panic("APIC ID %d already used", + mp_ioapics[apic].mpc_apicid); + reg_00.ID = mp_ioapics[apic].mpc_apicid; io_apic_write(apic, 0, *(int *)®_00); @@ -1021,7 +999,6 @@ static void __init construct_default_ISA_mptable(void) mp_irqs[0].mpc_dstirq = 2; } - setup_ioapic_default_id(); } /* @@ -1264,6 +1241,7 @@ static inline void check_timer(void) /* * get/set the timer IRQ vector: */ + disable_8259A_irq(0); vector = assign_irq_vector(0); set_intr_gate(vector, interrupt[0]); @@ -1390,7 +1368,6 @@ void IO_APIC_init_uniprocessor (void) { if (!smp_found_config) return; - phys_cpu_present_map = 0xff; setup_local_APIC(); setup_IO_APIC(); setup_APIC_clocks(); |