diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2008-07-14 14:08:13 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-18 08:27:47 -0400 |
commit | 49a66a0bcea8737e82035a31ad0d8cd64d027a5d (patch) | |
tree | fbb10b4d77ce97b8f328e243955d75053c3f3bcc /arch/x86/kernel/io_apic_32.c | |
parent | baa1318841d4bc95d783e6c15219b264720002c8 (diff) |
x86: I/O APIC: Always report how the timer has been set up
Following recent (and less so) issues with the 8254 timer when routed
through the I/O or local APIC, always report which configurations have
been tried and which one has been set up eventually. This is so that logs
posted by people for some other reason can be used as a cross-reference
when investigating any possible future problems.
The change unifies messages printed on 32-bit and 64-bit platforms and
adds trailing newlines (removes leading ones), so that proper log level
annotation can be used and any possible interspersed output will not cause
a mess.
I have chosen to use apic_printk(APIC_QUIET, ...) rather than printk(...)
so that the distinction of these messages is maintained making possible
future decisions about changes in this area easier. A change posted
separately making apic_verbosity unsigned removes any extra code that
would otherwise be generated as a result of this design decision.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/io_apic_32.c')
-rw-r--r-- | arch/x86/kernel/io_apic_32.c | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c index eabaf9244f5..de9aa0e3a9c 100644 --- a/arch/x86/kernel/io_apic_32.c +++ b/arch/x86/kernel/io_apic_32.c | |||
@@ -2177,8 +2177,9 @@ static inline void __init check_timer(void) | |||
2177 | pin2 = ioapic_i8259.pin; | 2177 | pin2 = ioapic_i8259.pin; |
2178 | apic2 = ioapic_i8259.apic; | 2178 | apic2 = ioapic_i8259.apic; |
2179 | 2179 | ||
2180 | printk(KERN_INFO "..TIMER: vector=0x%02X apic1=%d pin1=%d apic2=%d pin2=%d\n", | 2180 | apic_printk(APIC_QUIET, KERN_INFO "..TIMER: vector=0x%02X " |
2181 | vector, apic1, pin1, apic2, pin2); | 2181 | "apic1=%d pin1=%d apic2=%d pin2=%d\n", |
2182 | vector, apic1, pin1, apic2, pin2); | ||
2182 | 2183 | ||
2183 | /* | 2184 | /* |
2184 | * Some BIOS writers are clueless and report the ExtINTA | 2185 | * Some BIOS writers are clueless and report the ExtINTA |
@@ -2216,12 +2217,13 @@ static inline void __init check_timer(void) | |||
2216 | } | 2217 | } |
2217 | clear_IO_APIC_pin(apic1, pin1); | 2218 | clear_IO_APIC_pin(apic1, pin1); |
2218 | if (!no_pin1) | 2219 | if (!no_pin1) |
2219 | printk(KERN_ERR "..MP-BIOS bug: " | 2220 | apic_printk(APIC_QUIET, KERN_ERR "..MP-BIOS bug: " |
2220 | "8254 timer not connected to IO-APIC\n"); | 2221 | "8254 timer not connected to IO-APIC\n"); |
2221 | 2222 | ||
2222 | printk(KERN_INFO "...trying to set up timer (IRQ0) " | 2223 | apic_printk(APIC_QUIET, KERN_INFO "...trying to set up timer " |
2223 | "through the 8259A ... "); | 2224 | "(IRQ0) through the 8259A ...\n"); |
2224 | printk("\n..... (found pin %d) ...", pin2); | 2225 | apic_printk(APIC_QUIET, KERN_INFO |
2226 | "..... (found apic %d pin %d) ...\n", apic2, pin2); | ||
2225 | /* | 2227 | /* |
2226 | * legacy devices should be connected to IO APIC #0 | 2228 | * legacy devices should be connected to IO APIC #0 |
2227 | */ | 2229 | */ |
@@ -2230,7 +2232,7 @@ static inline void __init check_timer(void) | |||
2230 | unmask_IO_APIC_irq(0); | 2232 | unmask_IO_APIC_irq(0); |
2231 | enable_8259A_irq(0); | 2233 | enable_8259A_irq(0); |
2232 | if (timer_irq_works()) { | 2234 | if (timer_irq_works()) { |
2233 | printk("works.\n"); | 2235 | apic_printk(APIC_QUIET, KERN_INFO "....... works.\n"); |
2234 | timer_through_8259 = 1; | 2236 | timer_through_8259 = 1; |
2235 | if (nmi_watchdog == NMI_IO_APIC) { | 2237 | if (nmi_watchdog == NMI_IO_APIC) { |
2236 | disable_8259A_irq(0); | 2238 | disable_8259A_irq(0); |
@@ -2244,30 +2246,33 @@ static inline void __init check_timer(void) | |||
2244 | */ | 2246 | */ |
2245 | disable_8259A_irq(0); | 2247 | disable_8259A_irq(0); |
2246 | clear_IO_APIC_pin(apic2, pin2); | 2248 | clear_IO_APIC_pin(apic2, pin2); |
2247 | printk(" failed.\n"); | 2249 | apic_printk(APIC_QUIET, KERN_INFO "....... failed.\n"); |
2248 | } | 2250 | } |
2249 | 2251 | ||
2250 | if (nmi_watchdog == NMI_IO_APIC) { | 2252 | if (nmi_watchdog == NMI_IO_APIC) { |
2251 | printk(KERN_WARNING "timer doesn't work through the IO-APIC - disabling NMI Watchdog!\n"); | 2253 | apic_printk(APIC_QUIET, KERN_WARNING "timer doesn't work " |
2254 | "through the IO-APIC - disabling NMI Watchdog!\n"); | ||
2252 | nmi_watchdog = NMI_NONE; | 2255 | nmi_watchdog = NMI_NONE; |
2253 | } | 2256 | } |
2254 | timer_ack = 0; | 2257 | timer_ack = 0; |
2255 | 2258 | ||
2256 | printk(KERN_INFO "...trying to set up timer as Virtual Wire IRQ..."); | 2259 | apic_printk(APIC_QUIET, KERN_INFO |
2260 | "...trying to set up timer as Virtual Wire IRQ...\n"); | ||
2257 | 2261 | ||
2258 | lapic_register_intr(0, vector); | 2262 | lapic_register_intr(0, vector); |
2259 | apic_write(APIC_LVT0, APIC_DM_FIXED | vector); /* Fixed mode */ | 2263 | apic_write(APIC_LVT0, APIC_DM_FIXED | vector); /* Fixed mode */ |
2260 | enable_8259A_irq(0); | 2264 | enable_8259A_irq(0); |
2261 | 2265 | ||
2262 | if (timer_irq_works()) { | 2266 | if (timer_irq_works()) { |
2263 | printk(" works.\n"); | 2267 | apic_printk(APIC_QUIET, KERN_INFO "..... works.\n"); |
2264 | goto out; | 2268 | goto out; |
2265 | } | 2269 | } |
2266 | disable_8259A_irq(0); | 2270 | disable_8259A_irq(0); |
2267 | apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_FIXED | vector); | 2271 | apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_FIXED | vector); |
2268 | printk(" failed.\n"); | 2272 | apic_printk(APIC_QUIET, KERN_INFO "..... failed.\n"); |
2269 | 2273 | ||
2270 | printk(KERN_INFO "...trying to set up timer as ExtINT IRQ..."); | 2274 | apic_printk(APIC_QUIET, KERN_INFO |
2275 | "...trying to set up timer as ExtINT IRQ...\n"); | ||
2271 | 2276 | ||
2272 | init_8259A(0); | 2277 | init_8259A(0); |
2273 | make_8259A_irq(0); | 2278 | make_8259A_irq(0); |
@@ -2276,12 +2281,12 @@ static inline void __init check_timer(void) | |||
2276 | unlock_ExtINT_logic(); | 2281 | unlock_ExtINT_logic(); |
2277 | 2282 | ||
2278 | if (timer_irq_works()) { | 2283 | if (timer_irq_works()) { |
2279 | printk(" works.\n"); | 2284 | apic_printk(APIC_QUIET, KERN_INFO "..... works.\n"); |
2280 | goto out; | 2285 | goto out; |
2281 | } | 2286 | } |
2282 | printk(" failed :(.\n"); | 2287 | apic_printk(APIC_QUIET, KERN_INFO "..... failed :(.\n"); |
2283 | panic("IO-APIC + timer doesn't work! Boot with apic=debug and send a " | 2288 | panic("IO-APIC + timer doesn't work! Boot with apic=debug and send a " |
2284 | "report. Then try booting with the 'noapic' option"); | 2289 | "report. Then try booting with the 'noapic' option.\n"); |
2285 | out: | 2290 | out: |
2286 | local_irq_restore(flags); | 2291 | local_irq_restore(flags); |
2287 | } | 2292 | } |