diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-01-15 20:28:01 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-01-15 20:28:01 -0500 |
commit | 3fa116e8bdd94b4075cfb1e927f8c1fd3e31f582 (patch) | |
tree | 3720155d4687826bfd78f24c5dfacab61667c6f7 /arch | |
parent | f800c25b7a762d445ba1439a2428c8362157eba6 (diff) | |
parent | a87e810f61b49f19bd29ea564b7cd1e92e43d989 (diff) |
Merge tag 'powerpc-3.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux
Pull powerpc fixes from Michael Ellerman:
"A few powerpc fixes"
* tag 'powerpc-3.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux:
powerpc: Work around gcc bug in current_thread_info()
cxl: Fix issues when unmapping contexts
powernv: Fix OPAL tracepoint code
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/include/asm/thread_info.h | 13 | ||||
-rw-r--r-- | arch/powerpc/platforms/powernv/opal-wrappers.S | 1 |
2 files changed, 7 insertions, 7 deletions
diff --git a/arch/powerpc/include/asm/thread_info.h b/arch/powerpc/include/asm/thread_info.h index ebc4f165690a..0be6c681cab1 100644 --- a/arch/powerpc/include/asm/thread_info.h +++ b/arch/powerpc/include/asm/thread_info.h | |||
@@ -23,9 +23,9 @@ | |||
23 | #define THREAD_SIZE (1 << THREAD_SHIFT) | 23 | #define THREAD_SIZE (1 << THREAD_SHIFT) |
24 | 24 | ||
25 | #ifdef CONFIG_PPC64 | 25 | #ifdef CONFIG_PPC64 |
26 | #define CURRENT_THREAD_INFO(dest, sp) clrrdi dest, sp, THREAD_SHIFT | 26 | #define CURRENT_THREAD_INFO(dest, sp) stringify_in_c(clrrdi dest, sp, THREAD_SHIFT) |
27 | #else | 27 | #else |
28 | #define CURRENT_THREAD_INFO(dest, sp) rlwinm dest, sp, 0, 0, 31-THREAD_SHIFT | 28 | #define CURRENT_THREAD_INFO(dest, sp) stringify_in_c(rlwinm dest, sp, 0, 0, 31-THREAD_SHIFT) |
29 | #endif | 29 | #endif |
30 | 30 | ||
31 | #ifndef __ASSEMBLY__ | 31 | #ifndef __ASSEMBLY__ |
@@ -71,12 +71,13 @@ struct thread_info { | |||
71 | #define THREAD_SIZE_ORDER (THREAD_SHIFT - PAGE_SHIFT) | 71 | #define THREAD_SIZE_ORDER (THREAD_SHIFT - PAGE_SHIFT) |
72 | 72 | ||
73 | /* how to get the thread information struct from C */ | 73 | /* how to get the thread information struct from C */ |
74 | register unsigned long __current_r1 asm("r1"); | ||
75 | static inline struct thread_info *current_thread_info(void) | 74 | static inline struct thread_info *current_thread_info(void) |
76 | { | 75 | { |
77 | /* gcc4, at least, is smart enough to turn this into a single | 76 | unsigned long val; |
78 | * rlwinm for ppc32 and clrrdi for ppc64 */ | 77 | |
79 | return (struct thread_info *)(__current_r1 & ~(THREAD_SIZE-1)); | 78 | asm (CURRENT_THREAD_INFO(%0,1) : "=r" (val)); |
79 | |||
80 | return (struct thread_info *)val; | ||
80 | } | 81 | } |
81 | 82 | ||
82 | #endif /* __ASSEMBLY__ */ | 83 | #endif /* __ASSEMBLY__ */ |
diff --git a/arch/powerpc/platforms/powernv/opal-wrappers.S b/arch/powerpc/platforms/powernv/opal-wrappers.S index 54eca8b3b288..0509bca5e830 100644 --- a/arch/powerpc/platforms/powernv/opal-wrappers.S +++ b/arch/powerpc/platforms/powernv/opal-wrappers.S | |||
@@ -40,7 +40,6 @@ BEGIN_FTR_SECTION; \ | |||
40 | b 1f; \ | 40 | b 1f; \ |
41 | END_FTR_SECTION(0, 1); \ | 41 | END_FTR_SECTION(0, 1); \ |
42 | ld r12,opal_tracepoint_refcount@toc(r2); \ | 42 | ld r12,opal_tracepoint_refcount@toc(r2); \ |
43 | std r12,32(r1); \ | ||
44 | cmpdi r12,0; \ | 43 | cmpdi r12,0; \ |
45 | bne- LABEL; \ | 44 | bne- LABEL; \ |
46 | 1: | 45 | 1: |