blob: 61d0a7d961360e626be283e720c5a1850aee44c2 [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
18static inline void store_NMI_vector(unsigned short *high, unsigned short *low)
19{
20 printk("Storing NMI vector\n");
Yinghai Lu569712b2008-11-16 03:12:49 -080021 *high =
Ingo Molnar6f177c02009-01-28 16:09:23 +010022 *((volatile unsigned short *)phys_to_virt(NUMAQ_TRAMPOLINE_PHYS_HIGH));
Yinghai Lu569712b2008-11-16 03:12:49 -080023 *low =
Ingo Molnar6f177c02009-01-28 16:09:23 +010024 *((volatile unsigned short *)phys_to_virt(NUMAQ_TRAMPOLINE_PHYS_LOW));
Linus Torvalds1da177e2005-04-16 15:20:36 -070025}
26
27static inline void restore_NMI_vector(unsigned short *high, unsigned short *low)
28{
29 printk("Restoring NMI vector\n");
Ingo Molnar6f177c02009-01-28 16:09:23 +010030 *((volatile unsigned short *)phys_to_virt(NUMAQ_TRAMPOLINE_PHYS_HIGH)) =
Yinghai Lu569712b2008-11-16 03:12:49 -080031 *high;
Ingo Molnar6f177c02009-01-28 16:09:23 +010032 *((volatile unsigned short *)phys_to_virt(NUMAQ_TRAMPOLINE_PHYS_LOW)) =
Yinghai Lu569712b2008-11-16 03:12:49 -080033 *low;
Linus Torvalds1da177e2005-04-16 15:20:36 -070034}
35
Yinghai Lu569712b2008-11-16 03:12:49 -080036static inline void inquire_remote_apic(int apicid)
37{
38}
Linus Torvalds1da177e2005-04-16 15:20:36 -070039
Yinghai Luedb181a2008-07-25 02:17:55 -070040#endif /* __ASM_NUMAQ_WAKECPU_H */