From dbbe3cb8cff6b494ac2cba6a94dc7aabe7e5b635 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Wed, 30 May 2007 19:01:47 -0700 Subject: [SPARC64]: Add missing NCS and SVC hypervisor interfaces. Signed-off-by: David S. Miller --- arch/sparc64/kernel/entry.S | 72 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) (limited to 'arch') diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S index 8f10dda0f5c..ed712e0b337 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 -- cgit v1.2.3 From 1fb8812ba5a4c34b680d4405216310233f3c7573 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Thu, 31 May 2007 01:19:24 -0700 Subject: [SPARC32]: Build fix. Fix 6197fe4d720ea3e2ee94cdc7ef32d6c0151199de arch/sparc/lib/atomic32.c: In function '__cmpxchg_u32': arch/sparc/lib/atomic32.c:127: error: 'addr' undeclared (first use in this function) arch/sparc/lib/atomic32.c:127: error: (Each undeclared identifier is reported only once arch/sparc/lib/atomic32.c:127: error: for each function it appears in.) I assume this is what was intended.. Signed-off-by: Andrew Morton Acked-by: William Irwin Signed-off-by: David S. Miller --- arch/sparc/lib/atomic32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch') diff --git a/arch/sparc/lib/atomic32.c b/arch/sparc/lib/atomic32.c index 617d29832e1..cbddeb38ffd 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; } -- cgit v1.2.3