aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/io_apic_32.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-18 17:00:05 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-18 17:00:05 -0400
commit453c1404c5273a30d715e5a83372a78cff70b6d9 (patch)
tree94a5a3abd85137c4def416a84a45989751260f20 /arch/x86/kernel/io_apic_32.c
parenta208f37a465e222218974ab20a31b42b7b4893b2 (diff)
parent35b680557f95564f70f21a8d3f5c72e101fab260 (diff)
Merge branch 'x86/apic' into x86/x2apic
Conflicts: arch/x86/kernel/paravirt.c arch/x86/kernel/smpboot.c arch/x86/kernel/vmi_32.c arch/x86/lguest/boot.c arch/x86/xen/enlighten.c include/asm-x86/apic.h include/asm-x86/paravirt.h 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.c53
1 files changed, 29 insertions, 24 deletions
diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c
index a82065b0699e..98e4db5373f3 100644
--- a/arch/x86/kernel/io_apic_32.c
+++ b/arch/x86/kernel/io_apic_32.c
@@ -756,7 +756,7 @@ void send_IPI_self(int vector)
756 /* 756 /*
757 * Send the IPI. The write to APIC_ICR fires this off. 757 * Send the IPI. The write to APIC_ICR fires this off.
758 */ 758 */
759 apic_write_around(APIC_ICR, cfg); 759 apic_write(APIC_ICR, cfg);
760} 760}
761#endif /* !CONFIG_SMP */ 761#endif /* !CONFIG_SMP */
762 762
@@ -2029,7 +2029,7 @@ static void mask_lapic_irq(unsigned int irq)
2029 unsigned long v; 2029 unsigned long v;
2030 2030
2031 v = apic_read(APIC_LVT0); 2031 v = apic_read(APIC_LVT0);
2032 apic_write_around(APIC_LVT0, v | APIC_LVT_MASKED); 2032 apic_write(APIC_LVT0, v | APIC_LVT_MASKED);
2033} 2033}
2034 2034
2035static void unmask_lapic_irq(unsigned int irq) 2035static void unmask_lapic_irq(unsigned int irq)
@@ -2037,7 +2037,7 @@ static void unmask_lapic_irq(unsigned int irq)
2037 unsigned long v; 2037 unsigned long v;
2038 2038
2039 v = apic_read(APIC_LVT0); 2039 v = apic_read(APIC_LVT0);
2040 apic_write_around(APIC_LVT0, v & ~APIC_LVT_MASKED); 2040 apic_write(APIC_LVT0, v & ~APIC_LVT_MASKED);
2041} 2041}
2042 2042
2043static struct irq_chip lapic_chip __read_mostly = { 2043static struct irq_chip lapic_chip __read_mostly = {
@@ -2167,7 +2167,7 @@ static inline void __init check_timer(void)
2167 * The AEOI mode will finish them in the 8259A 2167 * The AEOI mode will finish them in the 8259A
2168 * automatically. 2168 * automatically.
2169 */ 2169 */
2170 apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT); 2170 apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT);
2171 init_8259A(1); 2171 init_8259A(1);
2172 timer_ack = (nmi_watchdog == NMI_IO_APIC && !APIC_INTEGRATED(ver)); 2172 timer_ack = (nmi_watchdog == NMI_IO_APIC && !APIC_INTEGRATED(ver));
2173 2173
@@ -2176,8 +2176,9 @@ static inline void __init check_timer(void)
2176 pin2 = ioapic_i8259.pin; 2176 pin2 = ioapic_i8259.pin;
2177 apic2 = ioapic_i8259.apic; 2177 apic2 = ioapic_i8259.apic;
2178 2178
2179 printk(KERN_INFO "..TIMER: vector=0x%02X apic1=%d pin1=%d apic2=%d pin2=%d\n", 2179 apic_printk(APIC_QUIET, KERN_INFO "..TIMER: vector=0x%02X "
2180 vector, apic1, pin1, apic2, pin2); 2180 "apic1=%d pin1=%d apic2=%d pin2=%d\n",
2181 vector, apic1, pin1, apic2, pin2);
2181 2182
2182 /* 2183 /*
2183 * Some BIOS writers are clueless and report the ExtINTA 2184 * Some BIOS writers are clueless and report the ExtINTA
@@ -2215,12 +2216,13 @@ static inline void __init check_timer(void)
2215 } 2216 }
2216 clear_IO_APIC_pin(apic1, pin1); 2217 clear_IO_APIC_pin(apic1, pin1);
2217 if (!no_pin1) 2218 if (!no_pin1)
2218 printk(KERN_ERR "..MP-BIOS bug: " 2219 apic_printk(APIC_QUIET, KERN_ERR "..MP-BIOS bug: "
2219 "8254 timer not connected to IO-APIC\n"); 2220 "8254 timer not connected to IO-APIC\n");
2220 2221
2221 printk(KERN_INFO "...trying to set up timer (IRQ0) " 2222 apic_printk(APIC_QUIET, KERN_INFO "...trying to set up timer "
2222 "through the 8259A ... "); 2223 "(IRQ0) through the 8259A ...\n");
2223 printk("\n..... (found pin %d) ...", pin2); 2224 apic_printk(APIC_QUIET, KERN_INFO
2225 "..... (found apic %d pin %d) ...\n", apic2, pin2);
2224 /* 2226 /*
2225 * legacy devices should be connected to IO APIC #0 2227 * legacy devices should be connected to IO APIC #0
2226 */ 2228 */
@@ -2229,7 +2231,7 @@ static inline void __init check_timer(void)
2229 unmask_IO_APIC_irq(0); 2231 unmask_IO_APIC_irq(0);
2230 enable_8259A_irq(0); 2232 enable_8259A_irq(0);
2231 if (timer_irq_works()) { 2233 if (timer_irq_works()) {
2232 printk("works.\n"); 2234 apic_printk(APIC_QUIET, KERN_INFO "....... works.\n");
2233 timer_through_8259 = 1; 2235 timer_through_8259 = 1;
2234 if (nmi_watchdog == NMI_IO_APIC) { 2236 if (nmi_watchdog == NMI_IO_APIC) {
2235 disable_8259A_irq(0); 2237 disable_8259A_irq(0);
@@ -2243,44 +2245,47 @@ static inline void __init check_timer(void)
2243 */ 2245 */
2244 disable_8259A_irq(0); 2246 disable_8259A_irq(0);
2245 clear_IO_APIC_pin(apic2, pin2); 2247 clear_IO_APIC_pin(apic2, pin2);
2246 printk(" failed.\n"); 2248 apic_printk(APIC_QUIET, KERN_INFO "....... failed.\n");
2247 } 2249 }
2248 2250
2249 if (nmi_watchdog == NMI_IO_APIC) { 2251 if (nmi_watchdog == NMI_IO_APIC) {
2250 printk(KERN_WARNING "timer doesn't work through the IO-APIC - disabling NMI Watchdog!\n"); 2252 apic_printk(APIC_QUIET, KERN_WARNING "timer doesn't work "
2253 "through the IO-APIC - disabling NMI Watchdog!\n");
2251 nmi_watchdog = NMI_NONE; 2254 nmi_watchdog = NMI_NONE;
2252 } 2255 }
2253 timer_ack = 0; 2256 timer_ack = 0;
2254 2257
2255 printk(KERN_INFO "...trying to set up timer as Virtual Wire IRQ..."); 2258 apic_printk(APIC_QUIET, KERN_INFO
2259 "...trying to set up timer as Virtual Wire IRQ...\n");
2256 2260
2257 lapic_register_intr(0, vector); 2261 lapic_register_intr(0, vector);
2258 apic_write_around(APIC_LVT0, APIC_DM_FIXED | vector); /* Fixed mode */ 2262 apic_write(APIC_LVT0, APIC_DM_FIXED | vector); /* Fixed mode */
2259 enable_8259A_irq(0); 2263 enable_8259A_irq(0);
2260 2264
2261 if (timer_irq_works()) { 2265 if (timer_irq_works()) {
2262 printk(" works.\n"); 2266 apic_printk(APIC_QUIET, KERN_INFO "..... works.\n");
2263 goto out; 2267 goto out;
2264 } 2268 }
2265 disable_8259A_irq(0); 2269 disable_8259A_irq(0);
2266 apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_FIXED | vector); 2270 apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_FIXED | vector);
2267 printk(" failed.\n"); 2271 apic_printk(APIC_QUIET, KERN_INFO "..... failed.\n");
2268 2272
2269 printk(KERN_INFO "...trying to set up timer as ExtINT IRQ..."); 2273 apic_printk(APIC_QUIET, KERN_INFO
2274 "...trying to set up timer as ExtINT IRQ...\n");
2270 2275
2271 init_8259A(0); 2276 init_8259A(0);
2272 make_8259A_irq(0); 2277 make_8259A_irq(0);
2273 apic_write_around(APIC_LVT0, APIC_DM_EXTINT); 2278 apic_write(APIC_LVT0, APIC_DM_EXTINT);
2274 2279
2275 unlock_ExtINT_logic(); 2280 unlock_ExtINT_logic();
2276 2281
2277 if (timer_irq_works()) { 2282 if (timer_irq_works()) {
2278 printk(" works.\n"); 2283 apic_printk(APIC_QUIET, KERN_INFO "..... works.\n");
2279 goto out; 2284 goto out;
2280 } 2285 }
2281 printk(" failed :(.\n"); 2286 apic_printk(APIC_QUIET, KERN_INFO "..... failed :(.\n");
2282 panic("IO-APIC + timer doesn't work! Boot with apic=debug and send a " 2287 panic("IO-APIC + timer doesn't work! Boot with apic=debug and send a "
2283 "report. Then try booting with the 'noapic' option"); 2288 "report. Then try booting with the 'noapic' option.\n");
2284out: 2289out:
2285 local_irq_restore(flags); 2290 local_irq_restore(flags);
2286} 2291}