Commit a16d9d25 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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
parents a492246c 5b24c421
...@@ -141,7 +141,7 @@ static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u) ...@@ -141,7 +141,7 @@ static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u)
#define atomic_sub_and_test(i,v) (atomic_sub_return((i),(v)) == 0) #define atomic_sub_and_test(i,v) (atomic_sub_return((i),(v)) == 0)
#define ATOMIC_INIT(i) ((atomic_t) { (i) }) #define ATOMIC_INIT(i) { (i) }
#define smp_mb__before_atomic_dec() smp_mb() #define smp_mb__before_atomic_dec() smp_mb()
#define smp_mb__after_atomic_dec() smp_mb() #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,7 +150,7 @@ static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u)
#ifdef CONFIG_64BIT #ifdef CONFIG_64BIT
#define ATOMIC64_INIT(i) ((atomic64_t) { (i) }) #define ATOMIC64_INIT(i) { (i) }
static __inline__ s64 static __inline__ s64
__atomic64_add_return(s64 i, atomic64_t *v) __atomic64_add_return(s64 i, atomic64_t *v)
......
...@@ -309,7 +309,7 @@ copy_thread(unsigned long clone_flags, unsigned long usp, ...@@ -309,7 +309,7 @@ copy_thread(unsigned long clone_flags, unsigned long usp,
cregs->ksp = (unsigned long)stack cregs->ksp = (unsigned long)stack
+ (pregs->gr[21] & (THREAD_SIZE - 1)); + (pregs->gr[21] & (THREAD_SIZE - 1));
cregs->gr[30] = usp; cregs->gr[30] = usp;
if (p->personality == PER_HPUX) { if (personality(p->personality) == PER_HPUX) {
#ifdef CONFIG_HPUX #ifdef CONFIG_HPUX
cregs->kpc = (unsigned long) &hpux_child_return; cregs->kpc = (unsigned long) &hpux_child_return;
#else #else
......
...@@ -225,12 +225,12 @@ long parisc_personality(unsigned long personality) ...@@ -225,12 +225,12 @@ long parisc_personality(unsigned long personality)
long err; long err;
if (personality(current->personality) == PER_LINUX32 if (personality(current->personality) == PER_LINUX32
&& personality == PER_LINUX) && personality(personality) == PER_LINUX)
personality = PER_LINUX32; personality = (personality & ~PER_MASK) | PER_LINUX32;
err = sys_personality(personality); err = sys_personality(personality);
if (err == PER_LINUX32) if (personality(err) == PER_LINUX32)
err = PER_LINUX; err = (err & ~PER_MASK) | PER_LINUX;
return err; return err;
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment