smp_64.h 1.7 KB

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