aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2008-05-21 17:09:19 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-08 03:12:54 -0400
commitecd29476ae0143b1c3641edfa76c0fc3e9ad3021 (patch)
treee8d836d6494ebc131c0b6576e63f87e1fac106aa /arch
parentd11d5794e0c21a1054e6cd57381050a999ad7232 (diff)
x86: I/O APIC: remove parameters to fiddle with the 8259A
Remove the "disable_8254_timer" and "enable_8254_timer" kernel parameters. Now that AEOI acknowledgements are no longer needed for correct timer operation, the 8259A can be kept disabled unconditionally unless interrupts, either timer or watchdog ones, are actually passed through it. Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/early-quirks.c13
-rw-r--r--arch/x86/kernel/io_apic_32.c21
-rw-r--r--arch/x86/kernel/io_apic_64.c21
3 files changed, 4 insertions, 51 deletions
diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
index 9f51e1ea9e82..84fd9f2a28ff 100644
--- a/arch/x86/kernel/early-quirks.c
+++ b/arch/x86/kernel/early-quirks.c
@@ -98,17 +98,6 @@ static void __init nvidia_bugs(int num, int slot, int func)
98 98
99} 99}
100 100
101static void __init ati_bugs(int num, int slot, int func)
102{
103#ifdef CONFIG_X86_IO_APIC
104 if (timer_over_8254 == 1) {
105 timer_over_8254 = 0;
106 printk(KERN_INFO
107 "ATI board detected. Disabling timer routing over 8254.\n");
108 }
109#endif
110}
111
112#define QFLAG_APPLY_ONCE 0x1 101#define QFLAG_APPLY_ONCE 0x1
113#define QFLAG_APPLIED 0x2 102#define QFLAG_APPLIED 0x2
114#define QFLAG_DONE (QFLAG_APPLY_ONCE|QFLAG_APPLIED) 103#define QFLAG_DONE (QFLAG_APPLY_ONCE|QFLAG_APPLIED)
@@ -126,8 +115,6 @@ static struct chipset early_qrk[] __initdata = {
126 PCI_CLASS_BRIDGE_PCI, PCI_ANY_ID, QFLAG_APPLY_ONCE, nvidia_bugs }, 115 PCI_CLASS_BRIDGE_PCI, PCI_ANY_ID, QFLAG_APPLY_ONCE, nvidia_bugs },
127 { PCI_VENDOR_ID_VIA, PCI_ANY_ID, 116 { PCI_VENDOR_ID_VIA, PCI_ANY_ID,
128 PCI_CLASS_BRIDGE_PCI, PCI_ANY_ID, QFLAG_APPLY_ONCE, via_bugs }, 117 PCI_CLASS_BRIDGE_PCI, PCI_ANY_ID, QFLAG_APPLY_ONCE, via_bugs },
129 { PCI_VENDOR_ID_ATI, PCI_ANY_ID,
130 PCI_CLASS_BRIDGE_PCI, PCI_ANY_ID, QFLAG_APPLY_ONCE, ati_bugs },
131 { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_K8_NB, 118 { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_K8_NB,
132 PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, fix_hypertransport_config }, 119 PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, fix_hypertransport_config },
133 {} 120 {}
diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c
index c64b3f5cc121..61cf366d040f 100644
--- a/arch/x86/kernel/io_apic_32.c
+++ b/arch/x86/kernel/io_apic_32.c
@@ -58,7 +58,6 @@ static struct { int pin, apic; } ioapic_i8259 = { -1, -1 };
58static DEFINE_SPINLOCK(ioapic_lock); 58static DEFINE_SPINLOCK(ioapic_lock);
59static DEFINE_SPINLOCK(vector_lock); 59static DEFINE_SPINLOCK(vector_lock);
60 60
61int timer_over_8254 __initdata = 1;
62 61
63/* 62/*
64 * Is the SiS APIC rmw bug present ? 63 * Is the SiS APIC rmw bug present ?
@@ -2157,8 +2156,6 @@ static inline void __init check_timer(void)
2157 apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT); 2156 apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT);
2158 init_8259A(1); 2157 init_8259A(1);
2159 timer_ack = (nmi_watchdog == NMI_IO_APIC && !APIC_INTEGRATED(ver)); 2158 timer_ack = (nmi_watchdog == NMI_IO_APIC && !APIC_INTEGRATED(ver));
2160 if (timer_over_8254 > 0)
2161 enable_8259A_irq(0);
2162 2159
2163 pin1 = find_isa_irq_pin(0, mp_INT); 2160 pin1 = find_isa_irq_pin(0, mp_INT);
2164 apic1 = find_isa_irq_apic(0, mp_INT); 2161 apic1 = find_isa_irq_apic(0, mp_INT);
@@ -2175,7 +2172,6 @@ static inline void __init check_timer(void)
2175 unmask_IO_APIC_irq(0); 2172 unmask_IO_APIC_irq(0);
2176 if (timer_irq_works()) { 2173 if (timer_irq_works()) {
2177 if (nmi_watchdog == NMI_IO_APIC) { 2174 if (nmi_watchdog == NMI_IO_APIC) {
2178 disable_8259A_irq(0);
2179 setup_nmi(); 2175 setup_nmi();
2180 enable_8259A_irq(0); 2176 enable_8259A_irq(0);
2181 } 2177 }
@@ -2195,6 +2191,7 @@ static inline void __init check_timer(void)
2195 * legacy devices should be connected to IO APIC #0 2191 * legacy devices should be connected to IO APIC #0
2196 */ 2192 */
2197 setup_ExtINT_IRQ0_pin(apic2, pin2, vector); 2193 setup_ExtINT_IRQ0_pin(apic2, pin2, vector);
2194 enable_8259A_irq(0);
2198 if (timer_irq_works()) { 2195 if (timer_irq_works()) {
2199 printk("works.\n"); 2196 printk("works.\n");
2200 if (pin1 != -1) 2197 if (pin1 != -1)
@@ -2209,6 +2206,7 @@ static inline void __init check_timer(void)
2209 /* 2206 /*
2210 * Cleanup, just in case ... 2207 * Cleanup, just in case ...
2211 */ 2208 */
2209 disable_8259A_irq(0);
2212 clear_IO_APIC_pin(apic2, pin2); 2210 clear_IO_APIC_pin(apic2, pin2);
2213 } 2211 }
2214 printk(" failed.\n"); 2212 printk(" failed.\n");
@@ -2221,7 +2219,6 @@ static inline void __init check_timer(void)
2221 2219
2222 printk(KERN_INFO "...trying to set up timer as Virtual Wire IRQ..."); 2220 printk(KERN_INFO "...trying to set up timer as Virtual Wire IRQ...");
2223 2221
2224 disable_8259A_irq(0);
2225 set_irq_chip_and_handler_name(0, &lapic_chip, handle_fasteoi_irq, 2222 set_irq_chip_and_handler_name(0, &lapic_chip, handle_fasteoi_irq,
2226 "fasteoi"); 2223 "fasteoi");
2227 apic_write_around(APIC_LVT0, APIC_DM_FIXED | vector); /* Fixed mode */ 2224 apic_write_around(APIC_LVT0, APIC_DM_FIXED | vector); /* Fixed mode */
@@ -2292,20 +2289,6 @@ void __init setup_IO_APIC(void)
2292 print_IO_APIC(); 2289 print_IO_APIC();
2293} 2290}
2294 2291
2295static int __init setup_disable_8254_timer(char *s)
2296{
2297 timer_over_8254 = -1;
2298 return 1;
2299}
2300static int __init setup_enable_8254_timer(char *s)
2301{
2302 timer_over_8254 = 2;
2303 return 1;
2304}
2305
2306__setup("disable_8254_timer", setup_disable_8254_timer);
2307__setup("enable_8254_timer", setup_enable_8254_timer);
2308
2309/* 2292/*
2310 * Called after all the initialization is done. If we didnt find any 2293 * Called after all the initialization is done. If we didnt find any
2311 * APIC bugs then we can allow the modify fast path 2294 * APIC bugs then we can allow the modify fast path
diff --git a/arch/x86/kernel/io_apic_64.c b/arch/x86/kernel/io_apic_64.c
index 7c34e38e4219..9f16ca4b5a24 100644
--- a/arch/x86/kernel/io_apic_64.c
+++ b/arch/x86/kernel/io_apic_64.c
@@ -90,7 +90,6 @@ static int no_timer_check;
90 90
91static int disable_timer_pin_1 __initdata; 91static int disable_timer_pin_1 __initdata;
92 92
93int timer_over_8254 __initdata = 1;
94 93
95/* Where if anywhere is the i8259 connect in external int mode */ 94/* Where if anywhere is the i8259 connect in external int mode */
96static struct { int pin, apic; } ioapic_i8259 = { -1, -1 }; 95static struct { int pin, apic; } ioapic_i8259 = { -1, -1 };
@@ -430,20 +429,6 @@ static int __init disable_timer_pin_setup(char *arg)
430} 429}
431__setup("disable_timer_pin_1", disable_timer_pin_setup); 430__setup("disable_timer_pin_1", disable_timer_pin_setup);
432 431
433static int __init setup_disable_8254_timer(char *s)
434{
435 timer_over_8254 = -1;
436 return 1;
437}
438static int __init setup_enable_8254_timer(char *s)
439{
440 timer_over_8254 = 2;
441 return 1;
442}
443
444__setup("disable_8254_timer", setup_disable_8254_timer);
445__setup("enable_8254_timer", setup_enable_8254_timer);
446
447 432
448/* 433/*
449 * Find the IRQ entry number of a certain pin. 434 * Find the IRQ entry number of a certain pin.
@@ -1674,8 +1659,6 @@ static inline void __init check_timer(void)
1674 */ 1659 */
1675 apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT); 1660 apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT);
1676 init_8259A(1); 1661 init_8259A(1);
1677 if (timer_over_8254 > 0)
1678 enable_8259A_irq(0);
1679 1662
1680 pin1 = find_isa_irq_pin(0, mp_INT); 1663 pin1 = find_isa_irq_pin(0, mp_INT);
1681 apic1 = find_isa_irq_apic(0, mp_INT); 1664 apic1 = find_isa_irq_apic(0, mp_INT);
@@ -1693,7 +1676,6 @@ static inline void __init check_timer(void)
1693 if (!no_timer_check && timer_irq_works()) { 1676 if (!no_timer_check && timer_irq_works()) {
1694 nmi_watchdog_default(); 1677 nmi_watchdog_default();
1695 if (nmi_watchdog == NMI_IO_APIC) { 1678 if (nmi_watchdog == NMI_IO_APIC) {
1696 disable_8259A_irq(0);
1697 setup_nmi(); 1679 setup_nmi();
1698 enable_8259A_irq(0); 1680 enable_8259A_irq(0);
1699 } 1681 }
@@ -1715,6 +1697,7 @@ static inline void __init check_timer(void)
1715 * legacy devices should be connected to IO APIC #0 1697 * legacy devices should be connected to IO APIC #0
1716 */ 1698 */
1717 setup_ExtINT_IRQ0_pin(apic2, pin2, cfg->vector); 1699 setup_ExtINT_IRQ0_pin(apic2, pin2, cfg->vector);
1700 enable_8259A_irq(0);
1718 if (timer_irq_works()) { 1701 if (timer_irq_works()) {
1719 apic_printk(APIC_VERBOSE," works.\n"); 1702 apic_printk(APIC_VERBOSE," works.\n");
1720 nmi_watchdog_default(); 1703 nmi_watchdog_default();
@@ -1726,6 +1709,7 @@ static inline void __init check_timer(void)
1726 /* 1709 /*
1727 * Cleanup, just in case ... 1710 * Cleanup, just in case ...
1728 */ 1711 */
1712 disable_8259A_irq(0);
1729 clear_IO_APIC_pin(apic2, pin2); 1713 clear_IO_APIC_pin(apic2, pin2);
1730 } 1714 }
1731 apic_printk(APIC_VERBOSE," failed.\n"); 1715 apic_printk(APIC_VERBOSE," failed.\n");
@@ -1737,7 +1721,6 @@ static inline void __init check_timer(void)
1737 1721
1738 apic_printk(APIC_VERBOSE, KERN_INFO "...trying to set up timer as Virtual Wire IRQ..."); 1722 apic_printk(APIC_VERBOSE, KERN_INFO "...trying to set up timer as Virtual Wire IRQ...");
1739 1723
1740 disable_8259A_irq(0);
1741 irq_desc[0].chip = &lapic_irq_type; 1724 irq_desc[0].chip = &lapic_irq_type;
1742 apic_write(APIC_LVT0, APIC_DM_FIXED | cfg->vector); /* Fixed mode */ 1725 apic_write(APIC_LVT0, APIC_DM_FIXED | cfg->vector); /* Fixed mode */
1743 enable_8259A_irq(0); 1726 enable_8259A_irq(0);