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