smp.h 502 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef ASMARM_ARCH_SMP_H
  2. #define ASMARM_ARCH_SMP_H
  3. #include <linux/config.h>
  4. #include <asm/hardware/gic.h>
  5. #define hard_smp_processor_id() \
  6. ({ \
  7. unsigned int cpunum; \
  8. __asm__("mrc p15, 0, %0, c0, c0, 5" \
  9. : "=r" (cpunum)); \
  10. cpunum &= 0x0F; \
  11. })
  12. /*
  13. * We use IRQ1 as the IPI
  14. */
  15. static inline void smp_cross_call(cpumask_t callmap)
  16. {
  17. gic_raise_softirq(callmap, 1);
  18. }
  19. /*
  20. * Do nothing on MPcore.
  21. */
  22. static inline void smp_cross_call_done(cpumask_t callmap)
  23. {
  24. }
  25. #endif