smp.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #ifndef __ASM_SMP_H
  2. #define __ASM_SMP_H
  3. #if defined(CONFIG_SMP)
  4. /* Page Zero Location PDC will look for the address to branch to when we poke
  5. ** slave CPUs still in "Icache loop".
  6. */
  7. #define PDC_OS_BOOT_RENDEZVOUS 0x10
  8. #define PDC_OS_BOOT_RENDEZVOUS_HI 0x28
  9. #ifndef ASSEMBLY
  10. #include <linux/bitops.h>
  11. #include <linux/threads.h> /* for NR_CPUS */
  12. #include <linux/cpumask.h>
  13. typedef unsigned long address_t;
  14. /*
  15. * Private routines/data
  16. *
  17. * physical and logical are equivalent until we support CPU hotplug.
  18. */
  19. #define cpu_number_map(cpu) (cpu)
  20. #define cpu_logical_map(cpu) (cpu)
  21. extern void smp_send_all_nop(void);
  22. extern void arch_send_call_function_single_ipi(int cpu);
  23. extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
  24. #endif /* !ASSEMBLY */
  25. #define raw_smp_processor_id() (current_thread_info()->cpu)
  26. #else /* CONFIG_SMP */
  27. static inline void smp_send_all_nop(void) { return; }
  28. #endif
  29. #define NO_PROC_ID 0xFF /* No processor magic marker */
  30. #define ANY_PROC_ID 0xFF /* Any processor magic marker */
  31. static inline int __cpu_disable (void) {
  32. return 0;
  33. }
  34. static inline void __cpu_die (unsigned int cpu) {
  35. while(1)
  36. ;
  37. }
  38. #endif /* __ASM_SMP_H */