mach_wakecpu.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #ifndef __ASM_MACH_WAKECPU_H
  2. #define __ASM_MACH_WAKECPU_H
  3. /*
  4. * This file copes with machines that wakeup secondary CPUs by the
  5. * INIT, INIT, STARTUP sequence.
  6. */
  7. #ifdef CONFIG_ES7000_CLUSTERED_APIC
  8. #define WAKE_SECONDARY_VIA_MIP
  9. #else
  10. #define WAKE_SECONDARY_VIA_INIT
  11. #endif
  12. #ifdef WAKE_SECONDARY_VIA_MIP
  13. extern int es7000_start_cpu(int cpu, unsigned long eip);
  14. static inline int
  15. wakeup_secondary_cpu(int phys_apicid, unsigned long start_eip)
  16. {
  17. int boot_error = 0;
  18. boot_error = es7000_start_cpu(phys_apicid, start_eip);
  19. return boot_error;
  20. }
  21. #endif
  22. #define TRAMPOLINE_LOW phys_to_virt(0x467)
  23. #define TRAMPOLINE_HIGH phys_to_virt(0x469)
  24. #define boot_cpu_apicid boot_cpu_physical_apicid
  25. static inline void wait_for_init_deassert(atomic_t *deassert)
  26. {
  27. #ifdef WAKE_SECONDARY_VIA_INIT
  28. while (!atomic_read(deassert));
  29. #endif
  30. return;
  31. }
  32. /* Nothing to do for most platforms, since cleared by the INIT cycle */
  33. static inline void smp_callin_clear_local_apic(void)
  34. {
  35. }
  36. static inline void store_NMI_vector(unsigned short *high, unsigned short *low)
  37. {
  38. }
  39. static inline void restore_NMI_vector(unsigned short *high, unsigned short *low)
  40. {
  41. }
  42. #if APIC_DEBUG
  43. #define inquire_remote_apic(apicid) __inquire_remote_apic(apicid)
  44. #else
  45. #define inquire_remote_apic(apicid) {}
  46. #endif
  47. #endif /* __ASM_MACH_WAKECPU_H */