Skip to content

Commit

Permalink
x86: remove the write-only timer_uses_ioapic_pin_0
Browse files Browse the repository at this point in the history
This patch removes the write-only timer_uses_ioapic_pin_0
(gsi can't be <= 15 in the line of it's fake usage in mpparse_32.c).

Spotted by the GNU C compiler.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Adrian Bunk authored and Ingo Molnar committed Apr 17, 2008
1 parent 6542fe8 commit ede1389
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
5 changes: 0 additions & 5 deletions arch/x86/kernel/io_apic_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -2114,8 +2114,6 @@ static inline void unlock_ExtINT_logic(void)
ioapic_write_entry(apic, pin, entry0);
}

int timer_uses_ioapic_pin_0;

/*
* This code may look a bit paranoid, but it's supposed to cooperate with
* a wide range of boards and BIOS bugs. Fortunately only the timer IRQ
Expand Down Expand Up @@ -2155,9 +2153,6 @@ static inline void __init check_timer(void)
pin2 = ioapic_i8259.pin;
apic2 = ioapic_i8259.apic;

if (pin1 == 0)
timer_uses_ioapic_pin_0 = 1;

printk(KERN_INFO "..TIMER: vector=0x%02X apic1=%d pin1=%d apic2=%d pin2=%d\n",
vector, apic1, pin1, apic2, pin2);

Expand Down
3 changes: 1 addition & 2 deletions arch/x86/kernel/mpparse_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -1176,8 +1176,7 @@ int mp_register_gsi(u32 gsi, int triggering, int polarity)
* So test for this condition, and if necessary, avoid
* the pin collision.
*/
if (gsi > 15 || (gsi == 0 && !timer_uses_ioapic_pin_0))
gsi = pci_irq++;
gsi = pci_irq++;
/*
* Don't assign IRQ used by ACPI SCI
*/
Expand Down
1 change: 0 additions & 1 deletion include/asm-x86/io_apic.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ extern int io_apic_get_version(int ioapic);
extern int io_apic_get_redir_entries(int ioapic);
extern int io_apic_set_pci_routing(int ioapic, int pin, int irq,
int edge_level, int active_high_low);
extern int timer_uses_ioapic_pin_0;
#endif /* CONFIG_ACPI */

extern int (*ioapic_renumber_irq)(int ioapic, int irq);
Expand Down

0 comments on commit ede1389

Please sign in to comment.