diff options
Diffstat (limited to 'include/asm-powerpc/current.h')
-rw-r--r-- | include/asm-powerpc/current.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/asm-powerpc/current.h b/include/asm-powerpc/current.h index 1938d6a..b8708ae 100644 --- a/include/asm-powerpc/current.h +++ b/include/asm-powerpc/current.h @@ -14,7 +14,17 @@ struct task_struct; #ifdef __powerpc64__ #include <asm/paca.h> -#define current (get_paca()->__current) +static inline struct task_struct *get_current(void) +{ + struct task_struct *task; + + __asm__ __volatile__("ld %0,%1(13)" + : "=r" (task) + : "i" (offsetof(struct paca_struct, __current))); + + return task; +} +#define current get_current() #else |