x86, smp: refactor ->store/restore_NMI_vector() methods
[linux-2.6/mini2440.git] / arch / x86 / include / asm / numaq / wakecpu.h
blob123201712a96607243b497e89a6dda826cd71aaf
1 #ifndef __ASM_NUMAQ_WAKECPU_H
2 #define __ASM_NUMAQ_WAKECPU_H
4 /* This file copes with machines that wakeup secondary CPUs by NMIs */
6 #define NUMAQ_TRAMPOLINE_PHYS_LOW (0x8)
7 #define NUMAQ_TRAMPOLINE_PHYS_HIGH (0xa)
9 /*
10 * Because we use NMIs rather than the INIT-STARTUP sequence to
11 * bootstrap the CPUs, the APIC may be in a weird state. Kick it:
13 static inline void numaq_smp_callin_clear_local_apic(void)
15 clear_local_APIC();
18 static inline void
19 numaq_store_NMI_vector(unsigned short *high, unsigned short *low)
21 printk("Storing NMI vector\n");
22 *high =
23 *((volatile unsigned short *)phys_to_virt(NUMAQ_TRAMPOLINE_PHYS_HIGH));
24 *low =
25 *((volatile unsigned short *)phys_to_virt(NUMAQ_TRAMPOLINE_PHYS_LOW));
28 static inline void
29 numaq_restore_NMI_vector(unsigned short *high, unsigned short *low)
31 printk("Restoring NMI vector\n");
32 *((volatile unsigned short *)phys_to_virt(NUMAQ_TRAMPOLINE_PHYS_HIGH)) =
33 *high;
34 *((volatile unsigned short *)phys_to_virt(NUMAQ_TRAMPOLINE_PHYS_LOW)) =
35 *low;
38 static inline void inquire_remote_apic(int apicid)
42 #endif /* __ASM_NUMAQ_WAKECPU_H */