mach_ipi.h 707 B

123456789101112131415161718192021222324252627282930
  1. #ifndef __ASM_MACH_IPI_H
  2. #define __ASM_MACH_IPI_H
  3. void send_IPI_mask_bitmask(cpumask_t mask, int vector);
  4. void __send_IPI_shortcut(unsigned int shortcut, int vector);
  5. static inline void send_IPI_mask(cpumask_t mask, int vector)
  6. {
  7. send_IPI_mask_bitmask(mask, vector);
  8. }
  9. static inline void send_IPI_allbutself(int vector)
  10. {
  11. /*
  12. * if there are no other CPUs in the system then we get an APIC send
  13. * error if we try to broadcast, thus avoid sending IPIs in this case.
  14. */
  15. if (!(num_online_cpus() > 1))
  16. return;
  17. __send_IPI_shortcut(APIC_DEST_ALLBUT, vector);
  18. return;
  19. }
  20. static inline void send_IPI_all(int vector)
  21. {
  22. __send_IPI_shortcut(APIC_DEST_ALLINC, vector);
  23. }
  24. #endif /* __ASM_MACH_IPI_H */