smp_64.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /* smp.h: Sparc64 specific SMP stuff.
  3. *
  4. * Copyright (C) 1996, 2008 David S. Miller ([email protected])
  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_cpu_possible_map(void);
  36. void smp_fill_in_sib_core_maps(void);
  37. void cpu_play_dead(void);
  38. void smp_fetch_global_regs(void);
  39. void smp_fetch_global_pmu(void);
  40. struct seq_file;
  41. void smp_bogo(struct seq_file *);
  42. void smp_info(struct seq_file *);
  43. void smp_callin(void);
  44. void cpu_panic(void);
  45. void smp_synchronize_tick_client(void);
  46. void smp_capture(void);
  47. void smp_release(void);
  48. #ifdef CONFIG_HOTPLUG_CPU
  49. int __cpu_disable(void);
  50. void __cpu_die(unsigned int cpu);
  51. #endif
  52. #endif /* !(__ASSEMBLY__) */
  53. #else
  54. #define hard_smp_processor_id() 0
  55. #define smp_fill_in_sib_core_maps() do { } while (0)
  56. #define smp_fetch_global_regs() do { } while (0)
  57. #define smp_fetch_global_pmu() do { } while (0)
  58. #define smp_fill_in_cpu_possible_map() do { } while (0)
  59. #define smp_init_cpu_poke() do { } while (0)
  60. #define scheduler_poke() do { } while (0)
  61. #endif /* !(CONFIG_SMP) */
  62. #endif /* !(_SPARC64_SMP_H) */