diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2010-02-26 16:37:43 -0500 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2010-02-26 16:37:31 -0500 |
commit | cbb870c8221147ae337612e04b2bb0211f31a74b (patch) | |
tree | aa0c80fde4a271d8a366afc76912c5dacdb7542a /arch/s390/include/asm/thread_info.h | |
parent | d96221ab1e7d86dc0d4666466979117cd1915386 (diff) |
[S390] Cleanup struct _lowcore usage and defines.
Use asm offsets to make sure the offset defines to struct _lowcore and
its layout don't get out of sync.
Also add a BUILD_BUG_ON() which checks that the size of the structure
is sane.
And while being at it change those sites which use odd casts to access
the current lowcore. These should use S390_lowcore instead.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/thread_info.h')
-rw-r--r-- | arch/s390/include/asm/thread_info.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/include/asm/thread_info.h b/arch/s390/include/asm/thread_info.h index 66069e736842..34f0873d6525 100644 --- a/arch/s390/include/asm/thread_info.h +++ b/arch/s390/include/asm/thread_info.h | |||
@@ -73,7 +73,7 @@ struct thread_info { | |||
73 | /* how to get the thread information struct from C */ | 73 | /* how to get the thread information struct from C */ |
74 | static inline struct thread_info *current_thread_info(void) | 74 | static inline struct thread_info *current_thread_info(void) |
75 | { | 75 | { |
76 | return (struct thread_info *)((*(unsigned long *) __LC_KERNEL_STACK)-THREAD_SIZE); | 76 | return (struct thread_info *)(S390_lowcore.kernel_stack - THREAD_SIZE); |
77 | } | 77 | } |
78 | 78 | ||
79 | #define THREAD_SIZE_ORDER THREAD_ORDER | 79 | #define THREAD_SIZE_ORDER THREAD_ORDER |