smp.h 1.2 KB

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