percpu_64.h 476 B

123456789101112131415161718192021222324
  1. #ifndef __ARCH_SPARC64_PERCPU__
  2. #define __ARCH_SPARC64_PERCPU__
  3. #include <linux/compiler.h>
  4. register unsigned long __local_per_cpu_offset asm("g5");
  5. #ifdef CONFIG_SMP
  6. #include <asm/trap_block.h>
  7. #define __per_cpu_offset(__cpu) \
  8. (trap_block[(__cpu)].__per_cpu_base)
  9. #define per_cpu_offset(x) (__per_cpu_offset(x))
  10. #define __my_cpu_offset __local_per_cpu_offset
  11. #else /* ! SMP */
  12. #endif /* SMP */
  13. #include <asm-generic/percpu.h>
  14. #endif /* __ARCH_SPARC64_PERCPU__ */