wakecpu.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #ifndef __ASM_ES7000_WAKECPU_H
  2. #define __ASM_ES7000_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. cpu_relax();
  30. #endif
  31. return;
  32. }
  33. /* Nothing to do for most platforms, since cleared by the INIT cycle */
  34. static inline void smp_callin_clear_local_apic(void)
  35. {
  36. }
  37. static inline void store_NMI_vector(unsigned short *high, unsigned short *low)
  38. {
  39. }
  40. static inline void restore_NMI_vector(unsigned short *high, unsigned short *low)
  41. {
  42. }
  43. #define inquire_remote_apic(apicid) do { \
  44. if (apic_verbosity >= APIC_DEBUG) \
  45. __inquire_remote_apic(apicid); \
  46. } while (0)
  47. #endif /* __ASM_MACH_WAKECPU_H */