X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-powerpc%2Fcurrent.h;h=e2c7f06931e72dfb514b19ef1ff1028306e88891;hb=bbce0b5ca2884b44dbfffff77e876a90b4184516;hp=1938d6abd255056f46711b2786c3720123d90445;hpb=fb7ffeb11bb7e9e75dc83ff67a4925c270e0fa3c;p=linux-2.6 diff --git a/include/asm-powerpc/current.h b/include/asm-powerpc/current.h index 1938d6abd2..e2c7f06931 100644 --- a/include/asm-powerpc/current.h +++ b/include/asm-powerpc/current.h @@ -12,9 +12,20 @@ struct task_struct; #ifdef __powerpc64__ +#include #include -#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