smp.h 1006 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /* smp.h: Sparc64 specific SMP stuff.
  2. *
  3. * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
  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 <asm/bitops.h>
  21. #include <asm/atomic.h>
  22. extern cpumask_t phys_cpu_present_map;
  23. #define cpu_possible_map phys_cpu_present_map
  24. extern cpumask_t cpu_sibling_map[NR_CPUS];
  25. /*
  26. * General functions that each host system must provide.
  27. */
  28. extern int hard_smp_processor_id(void);
  29. #define raw_smp_processor_id() (current_thread_info()->cpu)
  30. extern void smp_setup_cpu_possible_map(void);
  31. #endif /* !(__ASSEMBLY__) */
  32. #else
  33. #define smp_setup_cpu_possible_map() do { } while (0)
  34. #endif /* !(CONFIG_SMP) */
  35. #define NO_PROC_ID 0xFF
  36. #endif /* !(_SPARC64_SMP_H) */