smp.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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_reschedule(int cpu);
  22. extern void smp_send_all_nop(void);
  23. extern void arch_send_call_function_single_ipi(int cpu);
  24. extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
  25. #endif /* !ASSEMBLY */
  26. #define raw_smp_processor_id() (current_thread_info()->cpu)
  27. #else /* CONFIG_SMP */
  28. static inline void smp_send_all_nop(void) { return; }
  29. #endif
  30. #define NO_PROC_ID 0xFF /* No processor magic marker */
  31. #define ANY_PROC_ID 0xFF /* Any processor magic marker */
  32. static inline int __cpu_disable (void) {
  33. return 0;
  34. }
  35. static inline void __cpu_die (unsigned int cpu) {
  36. while(1)
  37. ;
  38. }
  39. extern int __cpu_up (unsigned int cpu);
  40. #endif /* __ASM_SMP_H */