X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-powerpc%2Fcurrent.h;h=e2c7f06931e72dfb514b19ef1ff1028306e88891;hb=d67c6f869c0a7f275689855161c93d714197e052;hp=1938d6abd255056f46711b2786c3720123d90445;hpb=e7de369050534025b33aab1033358bf47a577e4d;p=linux-2.6-omap-h63xx.git diff --git a/include/asm-powerpc/current.h b/include/asm-powerpc/current.h index 1938d6abd25..e2c7f06931e 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