]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
alpha: optimized current_pt_regs()
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 2 Aug 2012 18:56:48 +0000 (22:56 +0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 6 Sep 2012 17:57:24 +0000 (13:57 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/alpha/include/asm/thread_info.h

index 28335bd40e406d54557fc17d7dbc15eae88d1a8d..2c7f0a483b444cb326dd1335dfcd91637581675f 100644 (file)
@@ -49,6 +49,8 @@ struct thread_info {
 /* How to get the thread information struct from C.  */
 register struct thread_info *__current_thread_info __asm__("$8");
 #define current_thread_info()  __current_thread_info
+#define current_pt_regs() \
+  ((struct pt_regs *) ((char *)current_thread_info() + 2*PAGE_SIZE) - 1)
 
 #endif /* __ASSEMBLY__ */