smp_64.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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 <asm/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. extern int sparc64_multi_core;
  26. extern void arch_send_call_function_single_ipi(int cpu);
  27. extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
  28. #define arch_send_call_function_ipi_mask arch_send_call_function_ipi_mask
  29. /*
  30. * General functions that each host system must provide.
  31. */
  32. extern int hard_smp_processor_id(void);
  33. #define raw_smp_processor_id() (current_thread_info()->cpu)
  34. extern void smp_fill_in_sib_core_maps(void);
  35. extern void cpu_play_dead(void);
  36. extern void smp_fetch_global_regs(void);
  37. #ifdef CONFIG_HOTPLUG_CPU
  38. extern int __cpu_disable(void);
  39. extern void __cpu_die(unsigned int cpu);
  40. #endif
  41. #endif /* !(__ASSEMBLY__) */
  42. #else
  43. #define hard_smp_processor_id() 0
  44. #define smp_fill_in_sib_core_maps() do { } while (0)
  45. #define smp_fetch_global_regs() do { } while (0)
  46. #endif /* !(CONFIG_SMP) */
  47. #endif /* !(_SPARC64_SMP_H) */