forked from Minki/linux
PARISC misc on 20120331
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iQEcBAABAgAGBQJPdrMOAAoJEDeqqVYsXL0M2pYIAIVf1yn7EUfzEvabivpD0cCm RDS3F0LxW67Z0kccSPjQlJ/9DH/U6g/zfVct26E6G31/LJSJnNjHsU8Y+qSx+RYq f4ov5uyzqC2Vr0Y0hIxmNg8uKHKT7Z6z8KaWsambXfkWfmnXBaUUS5NEyWXhifU8 aOW2fX+Y31uPHs2iaDej3/IhjBaN+iB+eoUtqMHgBjFzg0dplM+mNR6NlIW6iWuX RA4Gc+Ujs/v4XI07bqn0y3znEmhdIy+csMM7cV1CAdB5DVC1qh5EkmV95AY1hAyG JcKwX5tg3dBlzPgrsvTsmy6jYPCzYDWjIuNUrgUV9ZmDPf/6Q9XRSE5qljovqrE= =OZIl -----END PGP SIGNATURE----- Merge tag 'parisc-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6 Pull PARISC misc updates from James Bottomley: "This is a couple of minor updates (fixing lws futex locking and removing some obsolete cpu_*_map calls)." * tag 'parisc-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6: [PARISC] remove references to cpu_*_map. [PARISC] futex: Use same lock set as lws calls
This commit is contained in:
commit
adb3b1f3fc
@ -8,6 +8,29 @@
|
||||
#include <asm/atomic.h>
|
||||
#include <asm/errno.h>
|
||||
|
||||
/* The following has to match the LWS code in syscall.S. We have
|
||||
sixteen four-word locks. */
|
||||
|
||||
static inline void
|
||||
_futex_spin_lock_irqsave(u32 __user *uaddr, unsigned long int *flags)
|
||||
{
|
||||
extern u32 lws_lock_start[];
|
||||
long index = ((long)uaddr & 0xf0) >> 2;
|
||||
arch_spinlock_t *s = (arch_spinlock_t *)&lws_lock_start[index];
|
||||
local_irq_save(*flags);
|
||||
arch_spin_lock(s);
|
||||
}
|
||||
|
||||
static inline void
|
||||
_futex_spin_unlock_irqrestore(u32 __user *uaddr, unsigned long int *flags)
|
||||
{
|
||||
extern u32 lws_lock_start[];
|
||||
long index = ((long)uaddr & 0xf0) >> 2;
|
||||
arch_spinlock_t *s = (arch_spinlock_t *)&lws_lock_start[index];
|
||||
arch_spin_unlock(s);
|
||||
local_irq_restore(*flags);
|
||||
}
|
||||
|
||||
static inline int
|
||||
futex_atomic_op_inuser (int encoded_op, u32 __user *uaddr)
|
||||
{
|
||||
@ -26,7 +49,7 @@ futex_atomic_op_inuser (int encoded_op, u32 __user *uaddr)
|
||||
|
||||
pagefault_disable();
|
||||
|
||||
_atomic_spin_lock_irqsave(uaddr, flags);
|
||||
_futex_spin_lock_irqsave(uaddr, &flags);
|
||||
|
||||
switch (op) {
|
||||
case FUTEX_OP_SET:
|
||||
@ -71,7 +94,7 @@ futex_atomic_op_inuser (int encoded_op, u32 __user *uaddr)
|
||||
ret = -ENOSYS;
|
||||
}
|
||||
|
||||
_atomic_spin_unlock_irqrestore(uaddr, flags);
|
||||
_futex_spin_unlock_irqrestore(uaddr, &flags);
|
||||
|
||||
pagefault_enable();
|
||||
|
||||
@ -113,7 +136,7 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
|
||||
* address. This should scale to a couple of CPUs.
|
||||
*/
|
||||
|
||||
_atomic_spin_lock_irqsave(uaddr, flags);
|
||||
_futex_spin_lock_irqsave(uaddr, &flags);
|
||||
|
||||
ret = get_user(val, uaddr);
|
||||
|
||||
@ -122,7 +145,7 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
|
||||
|
||||
*uval = val;
|
||||
|
||||
_atomic_spin_unlock_irqrestore(uaddr, flags);
|
||||
_futex_spin_unlock_irqrestore(uaddr, &flags);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -290,8 +290,7 @@ smp_cpu_init(int cpunum)
|
||||
mb();
|
||||
|
||||
/* Well, support 2.4 linux scheme as well. */
|
||||
if (cpu_isset(cpunum, cpu_online_map))
|
||||
{
|
||||
if (cpu_online(cpunum)) {
|
||||
extern void machine_halt(void); /* arch/parisc.../process.c */
|
||||
|
||||
printk(KERN_CRIT "CPU#%d already initialized!\n", cpunum);
|
||||
|
Loading…
Reference in New Issue
Block a user