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