blob: afe81439c7dbcc68cd42956b9de8ff3c092da919 [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
Ingo Molnar6f177c02009-01-28 16:09:23 +01006#define NUMAQ_TRAMPOLINE_PHYS_LOW (0x8)
7#define NUMAQ_TRAMPOLINE_PHYS_HIGH (0xa)
Linus Torvalds1da177e2005-04-16 15:20:36 -07008
Linus Torvalds1da177e2005-04-16 15:20:36 -07009/*
10 * Because we use NMIs rather than the INIT-STARTUP sequence to
Ingo Molnar333344d2009-01-28 16:31:52 +010011 * bootstrap the CPUs, the APIC may be in a weird state. Kick it:
Linus Torvalds1da177e2005-04-16 15:20:36 -070012 */
Ingo Molnar333344d2009-01-28 16:31:52 +010013static inline void numaq_smp_callin_clear_local_apic(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -070014{
15 clear_local_APIC();
16}
17
Ingo Molnar7bd06ec2009-01-28 16:31:52 +010018static inline void
19numaq_store_NMI_vector(unsigned short *high, unsigned short *low)
Linus Torvalds1da177e2005-04-16 15:20:36 -070020{
21 printk("Storing NMI vector\n");
Yinghai Lu569712b2008-11-16 03:12:49 -080022 *high =
Ingo Molnar6f177c02009-01-28 16:09:23 +010023 *((volatile unsigned short *)phys_to_virt(NUMAQ_TRAMPOLINE_PHYS_HIGH));
Yinghai Lu569712b2008-11-16 03:12:49 -080024 *low =
Ingo Molnar6f177c02009-01-28 16:09:23 +010025 *((volatile unsigned short *)phys_to_virt(NUMAQ_TRAMPOLINE_PHYS_LOW));
Linus Torvalds1da177e2005-04-16 15:20:36 -070026}
27
Yinghai Luedb181a2008-07-25 02:17:55 -070028#endif /* __ASM_NUMAQ_WAKECPU_H */