blob: 6f499df8eddbfd4246132bd570b87bfde68b4e00 [file] [log] [blame]
Yinghai Luedb181a2008-07-25 02:17:55 -07001#ifndef __ASM_NUMAQ_WAKECPU_H
2#define __ASM_NUMAQ_WAKECPU_H
Linus Torvalds1da177e2005-04-16 15:20:36 -07003
4/* This file copes with machines that wakeup secondary CPUs by NMIs */
5
Yinghai Lu569712b2008-11-16 03:12:49 -08006#define TRAMPOLINE_PHYS_LOW (0x8)
7#define TRAMPOLINE_PHYS_HIGH (0xa)
Linus Torvalds1da177e2005-04-16 15:20:36 -07008
9/* We don't do anything here because we use NMI's to boot instead */
10static inline void wait_for_init_deassert(atomic_t *deassert)
11{
12}
13
14/*
15 * Because we use NMIs rather than the INIT-STARTUP sequence to
16 * bootstrap the CPUs, the APIC may be in a weird state. Kick it.
17 */
18static inline void smp_callin_clear_local_apic(void)
19{
20 clear_local_APIC();
21}
22
23static inline void store_NMI_vector(unsigned short *high, unsigned short *low)
24{
25 printk("Storing NMI vector\n");
Yinghai Lu569712b2008-11-16 03:12:49 -080026 *high =
27 *((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_HIGH));
28 *low =
29 *((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_LOW));
Linus Torvalds1da177e2005-04-16 15:20:36 -070030}
31
32static inline void restore_NMI_vector(unsigned short *high, unsigned short *low)
33{
34 printk("Restoring NMI vector\n");
Yinghai Lu569712b2008-11-16 03:12:49 -080035 *((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_HIGH)) =
36 *high;
37 *((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_LOW)) =
38 *low;
Linus Torvalds1da177e2005-04-16 15:20:36 -070039}
40
Yinghai Lu569712b2008-11-16 03:12:49 -080041static inline void inquire_remote_apic(int apicid)
42{
43}
Linus Torvalds1da177e2005-04-16 15:20:36 -070044
Yinghai Luedb181a2008-07-25 02:17:55 -070045#endif /* __ASM_NUMAQ_WAKECPU_H */