X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=include%2Fasm-powerpc%2Fcurrent.h;h=b8708aedf925327c13e727d094ad6398b3156850;hb=81afe893181b283f9d182ea8637ce6ccdbe1a56a;hp=1938d6abd255056f46711b2786c3720123d90445;hpb=ab396e91bfe953db26fa1083d9c3e7a4fbe0334a;p=powerpc.git diff --git a/include/asm-powerpc/current.h b/include/asm-powerpc/current.h index 1938d6abd2..b8708aedf9 100644 --- a/include/asm-powerpc/current.h +++ b/include/asm-powerpc/current.h @@ -14,7 +14,17 @@ struct task_struct; #ifdef __powerpc64__ #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