Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef __ARCH_SPARC64_PERCPU__
0003 #define __ARCH_SPARC64_PERCPU__
0004 
0005 #include <linux/compiler.h>
0006 
0007 #ifndef BUILD_VDSO
0008 register unsigned long __local_per_cpu_offset asm("g5");
0009 #endif
0010 
0011 #ifdef CONFIG_SMP
0012 
0013 #include <asm/trap_block.h>
0014 
0015 #define __per_cpu_offset(__cpu) \
0016     (trap_block[(__cpu)].__per_cpu_base)
0017 #define per_cpu_offset(x) (__per_cpu_offset(x))
0018 
0019 #define __my_cpu_offset __local_per_cpu_offset
0020 
0021 #else /* ! SMP */
0022 
0023 #endif  /* SMP */
0024 
0025 #include <asm-generic/percpu.h>
0026 
0027 #endif /* __ARCH_SPARC64_PERCPU__ */