diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-08-31 20:02:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-08-31 20:02:20 -0400 |
commit | a16d9d25c364dc0f4f9e4af7dad829e7ced07e47 (patch) | |
tree | 6d46089783de3189df166a17783d0ccc53b942e1 | |
parent | a492246c3439bf2ba454f566258212f7bbd310bb (diff) | |
parent | 5b24c421621792fcc588af6f644d6acf2dd798cc (diff) |
Merge tag 'parisc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6
Pull PARISC fixes from James Bottomley:
"This is a set of two bug fixes. One is the ATOMIC problem which is
now causing a compile failure in certain situations. The other is
mishandling of PER_LINUX32 which may also cause user visible effects.
Signed-off-by: James Bottomley <JBottomley@Parallels.com>"
* tag 'parisc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6:
[PARISC] fix personality flag check in copy_thread()
[PARISC] Redefine ATOMIC_INIT and ATOMIC64_INIT to drop the casts
-rw-r--r-- | arch/parisc/include/asm/atomic.h | 4 | ||||
-rw-r--r-- | arch/parisc/kernel/process.c | 2 | ||||
-rw-r--r-- | arch/parisc/kernel/sys_parisc.c | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/arch/parisc/include/asm/atomic.h b/arch/parisc/include/asm/atomic.h index 6c6defc24619..af9cf30ed474 100644 --- a/arch/parisc/include/asm/atomic.h +++ b/arch/parisc/include/asm/atomic.h | |||
@@ -141,7 +141,7 @@ static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u) | |||
141 | 141 | ||
142 | #define atomic_sub_and_test(i,v) (atomic_sub_return((i),(v)) == 0) | 142 | #define atomic_sub_and_test(i,v) (atomic_sub_return((i),(v)) == 0) |
143 | 143 | ||
144 | #define ATOMIC_INIT(i) ((atomic_t) { (i) }) | 144 | #define ATOMIC_INIT(i) { (i) } |
145 | 145 | ||
146 | #define smp_mb__before_atomic_dec() smp_mb() | 146 | #define smp_mb__before_atomic_dec() smp_mb() |
147 | #define smp_mb__after_atomic_dec() smp_mb() | 147 | #define smp_mb__after_atomic_dec() smp_mb() |
@@ -150,7 +150,7 @@ static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u) | |||
150 | 150 | ||
151 | #ifdef CONFIG_64BIT | 151 | #ifdef CONFIG_64BIT |
152 | 152 | ||
153 | #define ATOMIC64_INIT(i) ((atomic64_t) { (i) }) | 153 | #define ATOMIC64_INIT(i) { (i) } |
154 | 154 | ||
155 | static __inline__ s64 | 155 | static __inline__ s64 |
156 | __atomic64_add_return(s64 i, atomic64_t *v) | 156 | __atomic64_add_return(s64 i, atomic64_t *v) |
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index d4b94b395c16..2c05a9292a81 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c | |||
@@ -309,7 +309,7 @@ copy_thread(unsigned long clone_flags, unsigned long usp, | |||
309 | cregs->ksp = (unsigned long)stack | 309 | cregs->ksp = (unsigned long)stack |
310 | + (pregs->gr[21] & (THREAD_SIZE - 1)); | 310 | + (pregs->gr[21] & (THREAD_SIZE - 1)); |
311 | cregs->gr[30] = usp; | 311 | cregs->gr[30] = usp; |
312 | if (p->personality == PER_HPUX) { | 312 | if (personality(p->personality) == PER_HPUX) { |
313 | #ifdef CONFIG_HPUX | 313 | #ifdef CONFIG_HPUX |
314 | cregs->kpc = (unsigned long) &hpux_child_return; | 314 | cregs->kpc = (unsigned long) &hpux_child_return; |
315 | #else | 315 | #else |
diff --git a/arch/parisc/kernel/sys_parisc.c b/arch/parisc/kernel/sys_parisc.c index c9b932260f47..7426e40699bd 100644 --- a/arch/parisc/kernel/sys_parisc.c +++ b/arch/parisc/kernel/sys_parisc.c | |||
@@ -225,12 +225,12 @@ long parisc_personality(unsigned long personality) | |||
225 | long err; | 225 | long err; |
226 | 226 | ||
227 | if (personality(current->personality) == PER_LINUX32 | 227 | if (personality(current->personality) == PER_LINUX32 |
228 | && personality == PER_LINUX) | 228 | && personality(personality) == PER_LINUX) |
229 | personality = PER_LINUX32; | 229 | personality = (personality & ~PER_MASK) | PER_LINUX32; |
230 | 230 | ||
231 | err = sys_personality(personality); | 231 | err = sys_personality(personality); |
232 | if (err == PER_LINUX32) | 232 | if (personality(err) == PER_LINUX32) |
233 | err = PER_LINUX; | 233 | err = (err & ~PER_MASK) | PER_LINUX; |
234 | 234 | ||
235 | return err; | 235 | return err; |
236 | } | 236 | } |