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