summaryrefslogtreecommitdiff
path: root/arch/sparc/include/asm/percpu_64.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-04-01 12:47:10 +0400
committerDavid S. Miller <davem@davemloft.net>2009-06-16 15:56:11 +0400
commit5a5488d3bb9a23d9884572e5d85dfeefe8749d3d (patch)
treeafa8db75cdf771257cd5541ed80a606df60f9cf8 /arch/sparc/include/asm/percpu_64.h
parent19f0fa3fb3499d8c5fb861933959f546d05fc202 (diff)
downloadlinux-5a5488d3bb9a23d9884572e5d85dfeefe8749d3d.tar.xz
sparc64: Store per-cpu offset in trap_block[]
Surprisingly this actually makes LOAD_PER_CPU_BASE() a little more efficient. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include/asm/percpu_64.h')
-rw-r--r--arch/sparc/include/asm/percpu_64.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/sparc/include/asm/percpu_64.h b/arch/sparc/include/asm/percpu_64.h
index bee64593023e..c0ab102d11f6 100644
--- a/arch/sparc/include/asm/percpu_64.h
+++ b/arch/sparc/include/asm/percpu_64.h
@@ -7,12 +7,12 @@ register unsigned long __local_per_cpu_offset asm("g5");
#ifdef CONFIG_SMP
+#include <asm/trap_block.h>
+
extern void real_setup_per_cpu_areas(void);
-extern unsigned long __per_cpu_base;
-extern unsigned long __per_cpu_shift;
#define __per_cpu_offset(__cpu) \
- (__per_cpu_base + ((unsigned long)(__cpu) << __per_cpu_shift))
+ (trap_block[(__cpu)].__per_cpu_base)
#define per_cpu_offset(x) (__per_cpu_offset(x))
#define __my_cpu_offset __local_per_cpu_offset