diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-31 09:14:12 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-31 09:14:12 -0700 |
commit | 0e9871df2389560e94ba01e40959140ee56def4b (patch) | |
tree | 249e21834a45ab2fb96f25141675f343c1f2490a /arch | |
parent | b9066c268abfe353edf5d646bb486bc03c839348 (diff) | |
parent | 8a73709ecc6a972c94e6ff9c0cc639f8f38b9151 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
[SPARC]: Missing #include <linux/mm.h> in drivers/sbus/char/flash.c
[SPARC32]: Build fix.
[SPARC64]: Add missing NCS and SVC hypervisor interfaces.
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sparc/lib/atomic32.c | 4 | ||||
-rw-r--r-- | arch/sparc64/kernel/entry.S | 72 |
2 files changed, 74 insertions, 2 deletions
diff --git a/arch/sparc/lib/atomic32.c b/arch/sparc/lib/atomic32.c index 617d29832e19..cbddeb38ffda 100644 --- a/arch/sparc/lib/atomic32.c +++ b/arch/sparc/lib/atomic32.c @@ -124,10 +124,10 @@ unsigned long __cmpxchg_u32(volatile u32 *ptr, u32 old, u32 new) unsigned long flags; u32 prev; - spin_lock_irqsave(ATOMIC_HASH(addr), flags); + spin_lock_irqsave(ATOMIC_HASH(ptr), flags); if ((prev = *ptr) == old) *ptr = new; - spin_unlock_irqrestore(ATOMIC_HASH(addr), flags); + spin_unlock_irqrestore(ATOMIC_HASH(ptr), flags); return (unsigned long)prev; } diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S index 8f10dda0f5c0..ed712e0b3372 100644 --- a/arch/sparc64/kernel/entry.S +++ b/arch/sparc64/kernel/entry.S @@ -2498,3 +2498,75 @@ sun4v_vintr_set_target: retl nop .size sun4v_vintr_set_target, .-sun4v_vintr_set_target + + /* %o0: NCS sub-function + * %o1: sub-function arg real-address + * %o2: sub-function arg size + * + * returns %o0: status + */ + .globl sun4v_ncs_request + .type sun4v_ncs_request,#function +sun4v_ncs_request: + mov HV_FAST_NCS_REQUEST, %o5 + ta HV_FAST_TRAP + retl + nop + .size sun4v_ncs_request, .-sun4v_ncs_request + + .globl sun4v_scv_send + .type sun4v_scv_send,#function +sun4v_scv_send: + save %sp, -192, %sp + mov %i0, %o0 + mov %i1, %o1 + mov %i2, %o2 + mov HV_FAST_SVC_SEND, %o5 + ta HV_FAST_TRAP + stx %o1, [%i3] + ret + restore + .size sun4v_scv_send, .-sun4v_scv_send + + .globl sun4v_scv_recv + .type sun4v_scv_recv,#function +sun4v_scv_recv: + save %sp, -192, %sp + mov %i0, %o0 + mov %i1, %o1 + mov %i2, %o2 + mov HV_FAST_SVC_RECV, %o5 + ta HV_FAST_TRAP + stx %o1, [%i3] + ret + restore + .size sun4v_scv_recv, .-sun4v_scv_recv + + .globl sun4v_scv_getstatus + .type sun4v_scv_getstatus,#function +sun4v_scv_getstatus: + mov HV_FAST_SVC_GETSTATUS, %o5 + mov %o1, %o4 + ta HV_FAST_TRAP + stx %o1, [%o4] + retl + nop + .size sun4v_scv_getstatus, .-sun4v_scv_getstatus + + .globl sun4v_scv_setstatus + .type sun4v_scv_setstatus,#function +sun4v_scv_setstatus: + mov HV_FAST_SVC_SETSTATUS, %o5 + ta HV_FAST_TRAP + retl + nop + .size sun4v_scv_setstatus, .-sun4v_scv_setstatus + + .globl sun4v_scv_clrstatus + .type sun4v_scv_clrstatus,#function +sun4v_scv_clrstatus: + mov HV_FAST_SVC_CLRSTATUS, %o5 + ta HV_FAST_TRAP + retl + nop + .size sun4v_scv_clrstatus, .-sun4v_scv_clrstatus |