mach_wakecpu.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #ifndef ASM_X86__MACH_ES7000__MACH_WAKECPU_H
  2. #define ASM_X86__MACH_ES7000__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. 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. #if APIC_DEBUG
  44. #define inquire_remote_apic(apicid) __inquire_remote_apic(apicid)
  45. #else
  46. #define inquire_remote_apic(apicid) {}
  47. #endif
  48. #endif /* ASM_X86__MACH_ES7000__MACH_WAKECPU_H */