diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2008-08-18 12:45:56 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-08-18 20:07:16 -0400 |
commit | c177b0bc03e0e11623e2099db42903fb0caf0fd3 (patch) | |
tree | 7681c1fcd3dbe25d716438cdae661a517b1ab782 /arch/x86/kernel/apic_64.c | |
parent | c40aaec6868401671a0ca14ed77e9b2da2d1f223 (diff) |
x86: apic - unify disconnect_bsp_APIC
- just #ifdef added
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/apic_64.c')
-rw-r--r-- | arch/x86/kernel/apic_64.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c index fe57db9f3fbb..0d969103fce7 100644 --- a/arch/x86/kernel/apic_64.c +++ b/arch/x86/kernel/apic_64.c | |||
@@ -1348,8 +1348,24 @@ void __init connect_bsp_APIC(void) | |||
1348 | */ | 1348 | */ |
1349 | void disconnect_bsp_APIC(int virt_wire_setup) | 1349 | void disconnect_bsp_APIC(int virt_wire_setup) |
1350 | { | 1350 | { |
1351 | #ifdef CONFIG_X86_32 | ||
1352 | if (pic_mode) { | ||
1353 | /* | ||
1354 | * Put the board back into PIC mode (has an effect only on | ||
1355 | * certain older boards). Note that APIC interrupts, including | ||
1356 | * IPIs, won't work beyond this point! The only exception are | ||
1357 | * INIT IPIs. | ||
1358 | */ | ||
1359 | apic_printk(APIC_VERBOSE, "disabling APIC mode, " | ||
1360 | "entering PIC mode.\n"); | ||
1361 | outb(0x70, 0x22); | ||
1362 | outb(0x00, 0x23); | ||
1363 | return; | ||
1364 | } | ||
1365 | #endif | ||
1366 | |||
1351 | /* Go back to Virtual Wire compatibility mode */ | 1367 | /* Go back to Virtual Wire compatibility mode */ |
1352 | unsigned long value; | 1368 | unsigned int value; |
1353 | 1369 | ||
1354 | /* For the spurious interrupt use vector F, and enable it */ | 1370 | /* For the spurious interrupt use vector F, and enable it */ |
1355 | value = apic_read(APIC_SPIV); | 1371 | value = apic_read(APIC_SPIV); |
@@ -1375,7 +1391,10 @@ void disconnect_bsp_APIC(int virt_wire_setup) | |||
1375 | apic_write(APIC_LVT0, APIC_LVT_MASKED); | 1391 | apic_write(APIC_LVT0, APIC_LVT_MASKED); |
1376 | } | 1392 | } |
1377 | 1393 | ||
1378 | /* For LVT1 make it edge triggered, active high, nmi and enabled */ | 1394 | /* |
1395 | * For LVT1 make it edge triggered, active high, | ||
1396 | * nmi and enabled | ||
1397 | */ | ||
1379 | value = apic_read(APIC_LVT1); | 1398 | value = apic_read(APIC_LVT1); |
1380 | value &= ~(APIC_MODE_MASK | APIC_SEND_PENDING | | 1399 | value &= ~(APIC_MODE_MASK | APIC_SEND_PENDING | |
1381 | APIC_INPUT_POLARITY | APIC_LVT_REMOTE_IRR | | 1400 | APIC_INPUT_POLARITY | APIC_LVT_REMOTE_IRR | |