smp_64.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /* smp.h: Sparc64 specific SMP stuff.
  3. *
  4. * Copyright (C) 1996, 2008 David S. Miller (davem@davemloft.net)
  5. */
  6. #ifndef _SPARC64_SMP_H
  7. #define _SPARC64_SMP_H
  8. #include <linux/threads.h>
  9. #include <asm/asi.h>
  10. #include <asm/starfire.h>
  11. #include <asm/spitfire.h>
  12. #ifndef __ASSEMBLY__
  13. #include <linux/cpumask.h>
  14. #include <linux/cache.h>
  15. #endif /* !(__ASSEMBLY__) */
  16. #ifdef CONFIG_SMP
  17. #ifndef __ASSEMBLY__
  18. /*
  19. * Private routines/data
  20. */
  21. #include <linux/bitops.h>
  22. #include <linux/atomic.h>
  23. #include <asm/percpu.h>
  24. DECLARE_PER_CPU(cpumask_t, cpu_sibling_map);
  25. extern cpumask_t cpu_core_map[NR_CPUS];
  26. void smp_init_cpu_poke(void);
  27. void scheduler_poke(void);
  28. void arch_send_call_function_single_ipi(int cpu);
  29. void arch_send_call_function_ipi_mask(const struct cpumask *mask);
  30. /*
  31. * General functions that each host system must provide.
  32. */
  33. int hard_smp_processor_id(void);
  34. #define raw_smp_processor_id() (current_thread_info()->cpu)
  35. void smp_fill_in_sib_core_maps(void);
  36. void __noreturn cpu_play_dead(void);
  37. void smp_fetch_global_regs(void);
  38. void smp_fetch_global_pmu(void);
  39. struct seq_file;
  40. void smp_bogo(struct seq_file *);
  41. void smp_info(struct seq_file *);
  42. void smp_callin(void);
  43. void cpu_panic(void);
  44. void smp_synchronize_tick_client(void);
  45. void smp_capture(void);
  46. void smp_release(void);
  47. #ifdef CONFIG_HOTPLUG_CPU
  48. int __cpu_disable(void);
  49. void __cpu_die(unsigned int cpu);
  50. #endif
  51. #endif /* !(__ASSEMBLY__) */
  52. #else
  53. #define hard_smp_processor_id() 0
  54. #define smp_fill_in_sib_core_maps() do { } while (0)
  55. #define smp_fetch_global_regs() do { } while (0)
  56. #define smp_fetch_global_pmu() do { } while (0)
  57. #define smp_init_cpu_poke() do { } while (0)
  58. #define scheduler_poke() do { } while (0)
  59. #endif /* !(CONFIG_SMP) */
  60. #endif /* !(_SPARC64_SMP_H) */