mach_wakecpu.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef __ASM_MACH_WAKECPU_H
  2. #define __ASM_MACH_WAKECPU_H
  3. /* This file copes with machines that wakeup secondary CPUs by NMIs */
  4. #define WAKE_SECONDARY_VIA_NMI
  5. #define TRAMPOLINE_LOW phys_to_virt(0x8)
  6. #define TRAMPOLINE_HIGH phys_to_virt(0xa)
  7. #define boot_cpu_apicid boot_cpu_logical_apicid
  8. /* We don't do anything here because we use NMI's to boot instead */
  9. static inline void wait_for_init_deassert(atomic_t *deassert)
  10. {
  11. }
  12. /*
  13. * Because we use NMIs rather than the INIT-STARTUP sequence to
  14. * bootstrap the CPUs, the APIC may be in a weird state. Kick it.
  15. */
  16. static inline void smp_callin_clear_local_apic(void)
  17. {
  18. clear_local_APIC();
  19. }
  20. static inline void store_NMI_vector(unsigned short *high, unsigned short *low)
  21. {
  22. printk("Storing NMI vector\n");
  23. *high = *((volatile unsigned short *) TRAMPOLINE_HIGH);
  24. *low = *((volatile unsigned short *) TRAMPOLINE_LOW);
  25. }
  26. static inline void restore_NMI_vector(unsigned short *high, unsigned short *low)
  27. {
  28. printk("Restoring NMI vector\n");
  29. *((volatile unsigned short *) TRAMPOLINE_HIGH) = *high;
  30. *((volatile unsigned short *) TRAMPOLINE_LOW) = *low;
  31. }
  32. #define inquire_remote_apic(apicid) {}
  33. #endif /* __ASM_MACH_WAKECPU_H */