2005-04-16 22:20:36 +00:00
|
|
|
#ifndef __ARCH_SPARC64_PERCPU__
|
|
|
|
#define __ARCH_SPARC64_PERCPU__
|
|
|
|
|
|
|
|
#include <linux/compiler.h>
|
|
|
|
|
2007-08-18 07:07:40 +00:00
|
|
|
register unsigned long __local_per_cpu_offset asm("g5");
|
|
|
|
|
2005-04-16 22:20:36 +00:00
|
|
|
#ifdef CONFIG_SMP
|
|
|
|
|
2007-05-25 22:49:59 +00:00
|
|
|
extern void real_setup_per_cpu_areas(void);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
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))
|
2006-07-03 07:24:26 +00:00
|
|
|
#define per_cpu_offset(x) (__per_cpu_offset(x))
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2008-01-30 22:27:58 +00:00
|
|
|
#define __my_cpu_offset __local_per_cpu_offset
|
|
|
|
|
2005-04-16 22:20:36 +00:00
|
|
|
#else /* ! SMP */
|
|
|
|
|
2007-05-25 22:49:59 +00:00
|
|
|
#define real_setup_per_cpu_areas() do { } while (0)
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
#endif /* SMP */
|
|
|
|
|
2008-01-30 22:27:58 +00:00
|
|
|
#include <asm-generic/percpu.h>
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
#endif /* __ARCH_SPARC64_PERCPU__ */
|