blob: f879252b7ea6b85de6e7d0bab4872de1ab8794be [file] [log] [blame]
Anton Blanchard7a0268f2006-01-11 13:16:44 +11001#ifndef _ASM_POWERPC_PERCPU_H_
2#define _ASM_POWERPC_PERCPU_H_
3#ifdef __powerpc64__
4#include <linux/compiler.h>
5
6/*
7 * Same as asm-generic/percpu.h, except that we store the per cpu offset
8 * in the paca. Based on the x86-64 implementation.
9 */
10
11#ifdef CONFIG_SMP
12
13#include <asm/paca.h>
14
15#define __per_cpu_offset(cpu) (paca[cpu].data_offset)
Hugh Dickins1e835272008-02-23 19:40:17 +000016#define __my_cpu_offset local_paca->data_offset
Ingo Molnara875a692006-07-03 00:24:26 -070017#define per_cpu_offset(x) (__per_cpu_offset(x))
Anton Blanchard7a0268f2006-01-11 13:16:44 +110018
travis@sgi.com56f90202008-01-30 23:27:58 +010019#endif /* CONFIG_SMP */
20#endif /* __powerpc64__ */
Anton Blanchard7a0268f2006-01-11 13:16:44 +110021
Stephen Rothwell6f9aa722005-08-29 14:08:11 +100022#include <asm-generic/percpu.h>
Anton Blanchard7a0268f2006-01-11 13:16:44 +110023
24#endif /* _ASM_POWERPC_PERCPU_H_ */