Yinghai Lu | edb181a | 2008-07-25 02:17:55 -0700 | [diff] [blame] | 1 | #ifndef __ASM_NUMAQ_WAKECPU_H |
| 2 | #define __ASM_NUMAQ_WAKECPU_H |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3 | |
| 4 | /* This file copes with machines that wakeup secondary CPUs by NMIs */ |
| 5 | |
Ingo Molnar | 6f177c0 | 2009-01-28 16:09:23 +0100 | [diff] [blame] | 6 | #define NUMAQ_TRAMPOLINE_PHYS_LOW (0x8) |
| 7 | #define NUMAQ_TRAMPOLINE_PHYS_HIGH (0xa) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 8 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | /* |
| 10 | * Because we use NMIs rather than the INIT-STARTUP sequence to |
Ingo Molnar | 333344d | 2009-01-28 16:31:52 +0100 | [diff] [blame] | 11 | * bootstrap the CPUs, the APIC may be in a weird state. Kick it: |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | */ |
Ingo Molnar | 333344d | 2009-01-28 16:31:52 +0100 | [diff] [blame] | 13 | static inline void numaq_smp_callin_clear_local_apic(void) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 14 | { |
| 15 | clear_local_APIC(); |
| 16 | } |
| 17 | |
Ingo Molnar | 7bd06ec | 2009-01-28 16:31:52 +0100 | [diff] [blame] | 18 | static inline void |
| 19 | numaq_store_NMI_vector(unsigned short *high, unsigned short *low) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 20 | { |
| 21 | printk("Storing NMI vector\n"); |
Yinghai Lu | 569712b | 2008-11-16 03:12:49 -0800 | [diff] [blame] | 22 | *high = |
Ingo Molnar | 6f177c0 | 2009-01-28 16:09:23 +0100 | [diff] [blame] | 23 | *((volatile unsigned short *)phys_to_virt(NUMAQ_TRAMPOLINE_PHYS_HIGH)); |
Yinghai Lu | 569712b | 2008-11-16 03:12:49 -0800 | [diff] [blame] | 24 | *low = |
Ingo Molnar | 6f177c0 | 2009-01-28 16:09:23 +0100 | [diff] [blame] | 25 | *((volatile unsigned short *)phys_to_virt(NUMAQ_TRAMPOLINE_PHYS_LOW)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 26 | } |
| 27 | |
Yinghai Lu | edb181a | 2008-07-25 02:17:55 -0700 | [diff] [blame] | 28 | #endif /* __ASM_NUMAQ_WAKECPU_H */ |