kernel-ark/arch/sparc/include/asm/percpu_64.h
David S. Miller 73fffc037e sparc64: Get rid of real_setup_per_cpu_areas().
Now that we defer the cpu_data() initializations to the end of per-cpu
setup, we can get rid of this local hack we had to setup the per-cpu
areas eary.

This is a necessary step in order to support HAVE_DYNAMIC_PER_CPU_AREA
since the per-cpu setup must run when page structs are available.

Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-16 04:56:23 -07:00

25 lines
476 B
C

#ifndef __ARCH_SPARC64_PERCPU__
#define __ARCH_SPARC64_PERCPU__
#include <linux/compiler.h>
register unsigned long __local_per_cpu_offset asm("g5");
#ifdef CONFIG_SMP
#include <asm/trap_block.h>
#define __per_cpu_offset(__cpu) \
(trap_block[(__cpu)].__per_cpu_base)
#define per_cpu_offset(x) (__per_cpu_offset(x))
#define __my_cpu_offset __local_per_cpu_offset
#else /* ! SMP */
#endif /* SMP */
#include <asm-generic/percpu.h>
#endif /* __ARCH_SPARC64_PERCPU__ */