X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-powerpc%2Fcurrent.h;h=e2c7f06931e72dfb514b19ef1ff1028306e88891;hb=5889ba0a6a1174ac38d7045824a2d2ed8e93d756;hp=1938d6abd255056f46711b2786c3720123d90445;hpb=292dd876ee765c478b27c93cc51e93a558ed58bf;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