diff options
author | Stuart Yoder <stuart.yoder@freescale.com> | 2012-07-05 08:41:35 +0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-07-11 08:18:22 +0400 |
commit | 9778b696a0188ad3b3524b383953ee73b31b7b68 (patch) | |
tree | ae706a4c23f3e5da85c6bc6e33a534eb20d0d338 /arch/powerpc/include/asm/thread_info.h | |
parent | db9112173b185995b80f56e136bd2ae44e4e6366 (diff) | |
download | linux-9778b696a0188ad3b3524b383953ee73b31b7b68.tar.xz |
powerpc: Use CURRENT_THREAD_INFO instead of open coded assembly
Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm/thread_info.h')
-rw-r--r-- | arch/powerpc/include/asm/thread_info.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/thread_info.h b/arch/powerpc/include/asm/thread_info.h index 68831e9cf82f..faf93529cbf0 100644 --- a/arch/powerpc/include/asm/thread_info.h +++ b/arch/powerpc/include/asm/thread_info.h @@ -22,6 +22,12 @@ #define THREAD_SIZE (1 << THREAD_SHIFT) +#ifdef CONFIG_PPC64 +#define CURRENT_THREAD_INFO(dest, sp) clrrdi dest, sp, THREAD_SHIFT +#else +#define CURRENT_THREAD_INFO(dest, sp) rlwinm dest, sp, 0, 0, 31-THREAD_SHIFT +#endif + #ifndef __ASSEMBLY__ #include <linux/cache.h> #include <asm/processor.h> |