[S390] current_thread_info optimization
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 5 Jan 2011 11:47:42 +0000 (12:47 +0100)
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>
Wed, 5 Jan 2011 11:47:27 +0000 (12:47 +0100)
Use thread_info lowcore field for current_thread_info(), saves
an unnecessary calculation.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/thread_info.h

index 5baf023..8145202 100644 (file)
@@ -74,7 +74,7 @@ struct thread_info {
 /* how to get the thread information struct from C */
 static inline struct thread_info *current_thread_info(void)
 {
-       return (struct thread_info *)(S390_lowcore.kernel_stack - THREAD_SIZE);
+       return (struct thread_info *) S390_lowcore.thread_info;
 }
 
 #define THREAD_SIZE_ORDER THREAD_ORDER