Skip to content

Commit ecd2947

Browse files
Maciej W. RozyckiIngo Molnar
authored andcommitted
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 <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
1 parent d11d579 commit ecd2947

File tree

4 files changed

+4
-52
lines changed

4 files changed

+4
-52
lines changed

arch/x86/kernel/early-quirks.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,6 @@ static void __init nvidia_bugs(int num, int slot, int func)
9898

9999
}
100100

101-
static 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-
112101
#define QFLAG_APPLY_ONCE 0x1
113102
#define QFLAG_APPLIED 0x2
114103
#define QFLAG_DONE (QFLAG_APPLY_ONCE|QFLAG_APPLIED)
@@ -126,8 +115,6 @@ static struct chipset early_qrk[] __initdata = {
126115
PCI_CLASS_BRIDGE_PCI, PCI_ANY_ID, QFLAG_APPLY_ONCE, nvidia_bugs },
127116
{ PCI_VENDOR_ID_VIA, PCI_ANY_ID,
128117
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 },
131118
{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_K8_NB,
132119
PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, fix_hypertransport_config },
133120
{}

arch/x86/kernel/io_apic_32.c

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ static struct { int pin, apic; } ioapic_i8259 = { -1, -1 };
5858
static DEFINE_SPINLOCK(ioapic_lock);
5959
static DEFINE_SPINLOCK(vector_lock);
6060

61-
int timer_over_8254 __initdata = 1;
6261

6362
/*
6463
* Is the SiS APIC rmw bug present ?
@@ -2157,8 +2156,6 @@ static inline void __init check_timer(void)
21572156
apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT);
21582157
init_8259A(1);
21592158
timer_ack = (nmi_watchdog == NMI_IO_APIC && !APIC_INTEGRATED(ver));
2160-
if (timer_over_8254 > 0)
2161-
enable_8259A_irq(0);
21622159

21632160
pin1 = find_isa_irq_pin(0, mp_INT);
21642161
apic1 = find_isa_irq_apic(0, mp_INT);
@@ -2175,7 +2172,6 @@ static inline void __init check_timer(void)
21752172
unmask_IO_APIC_irq(0);
21762173
if (timer_irq_works()) {
21772174
if (nmi_watchdog == NMI_IO_APIC) {
2178-
disable_8259A_irq(0);
21792175
setup_nmi();
21802176
enable_8259A_irq(0);
21812177
}
@@ -2195,6 +2191,7 @@ static inline void __init check_timer(void)
21952191
* legacy devices should be connected to IO APIC #0
21962192
*/
21972193
setup_ExtINT_IRQ0_pin(apic2, pin2, vector);
2194+
enable_8259A_irq(0);
21982195
if (timer_irq_works()) {
21992196
printk("works.\n");
22002197
if (pin1 != -1)
@@ -2209,6 +2206,7 @@ static inline void __init check_timer(void)
22092206
/*
22102207
* Cleanup, just in case ...
22112208
*/
2209+
disable_8259A_irq(0);
22122210
clear_IO_APIC_pin(apic2, pin2);
22132211
}
22142212
printk(" failed.\n");
@@ -2221,7 +2219,6 @@ static inline void __init check_timer(void)
22212219

22222220
printk(KERN_INFO "...trying to set up timer as Virtual Wire IRQ...");
22232221

2224-
disable_8259A_irq(0);
22252222
set_irq_chip_and_handler_name(0, &lapic_chip, handle_fasteoi_irq,
22262223
"fasteoi");
22272224
apic_write_around(APIC_LVT0, APIC_DM_FIXED | vector); /* Fixed mode */
@@ -2292,20 +2289,6 @@ void __init setup_IO_APIC(void)
22922289
print_IO_APIC();
22932290
}
22942291

2295-
static int __init setup_disable_8254_timer(char *s)
2296-
{
2297-
timer_over_8254 = -1;
2298-
return 1;
2299-
}
2300-
static 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-
23092292
/*
23102293
* Called after all the initialization is done. If we didnt find any
23112294
* APIC bugs then we can allow the modify fast path

arch/x86/kernel/io_apic_64.c

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ static int no_timer_check;
9090

9191
static int disable_timer_pin_1 __initdata;
9292

93-
int timer_over_8254 __initdata = 1;
9493

9594
/* Where if anywhere is the i8259 connect in external int mode */
9695
static struct { int pin, apic; } ioapic_i8259 = { -1, -1 };
@@ -430,20 +429,6 @@ static int __init disable_timer_pin_setup(char *arg)
430429
}
431430
__setup("disable_timer_pin_1", disable_timer_pin_setup);
432431

433-
static int __init setup_disable_8254_timer(char *s)
434-
{
435-
timer_over_8254 = -1;
436-
return 1;
437-
}
438-
static 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-
447432

448433
/*
449434
* Find the IRQ entry number of a certain pin.
@@ -1674,8 +1659,6 @@ static inline void __init check_timer(void)
16741659
*/
16751660
apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT);
16761661
init_8259A(1);
1677-
if (timer_over_8254 > 0)
1678-
enable_8259A_irq(0);
16791662

16801663
pin1 = find_isa_irq_pin(0, mp_INT);
16811664
apic1 = find_isa_irq_apic(0, mp_INT);
@@ -1693,7 +1676,6 @@ static inline void __init check_timer(void)
16931676
if (!no_timer_check && timer_irq_works()) {
16941677
nmi_watchdog_default();
16951678
if (nmi_watchdog == NMI_IO_APIC) {
1696-
disable_8259A_irq(0);
16971679
setup_nmi();
16981680
enable_8259A_irq(0);
16991681
}
@@ -1715,6 +1697,7 @@ static inline void __init check_timer(void)
17151697
* legacy devices should be connected to IO APIC #0
17161698
*/
17171699
setup_ExtINT_IRQ0_pin(apic2, pin2, cfg->vector);
1700+
enable_8259A_irq(0);
17181701
if (timer_irq_works()) {
17191702
apic_printk(APIC_VERBOSE," works.\n");
17201703
nmi_watchdog_default();
@@ -1726,6 +1709,7 @@ static inline void __init check_timer(void)
17261709
/*
17271710
* Cleanup, just in case ...
17281711
*/
1712+
disable_8259A_irq(0);
17291713
clear_IO_APIC_pin(apic2, pin2);
17301714
}
17311715
apic_printk(APIC_VERBOSE," failed.\n");
@@ -1737,7 +1721,6 @@ static inline void __init check_timer(void)
17371721

17381722
apic_printk(APIC_VERBOSE, KERN_INFO "...trying to set up timer as Virtual Wire IRQ...");
17391723

1740-
disable_8259A_irq(0);
17411724
irq_desc[0].chip = &lapic_irq_type;
17421725
apic_write(APIC_LVT0, APIC_DM_FIXED | cfg->vector); /* Fixed mode */
17431726
enable_8259A_irq(0);

include/asm-x86/apic.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ extern void generic_apic_probe(void);
3636
#ifdef CONFIG_X86_LOCAL_APIC
3737

3838
extern int apic_verbosity;
39-
extern int timer_over_8254;
4039
extern int local_apic_timer_c2_ok;
4140
extern int local_apic_timer_disabled;
4241

0 commit comments

Comments
 (0)