aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-31 12:14:12 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-31 12:14:12 -0400
commit0e9871df2389560e94ba01e40959140ee56def4b (patch)
tree249e21834a45ab2fb96f25141675f343c1f2490a /arch
parentb9066c268abfe353edf5d646bb486bc03c839348 (diff)
parent8a73709ecc6a972c94e6ff9c0cc639f8f38b9151 (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.c4
-rw-r--r--arch/sparc64/kernel/entry.S72
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)
124 unsigned long flags; 124 unsigned long flags;
125 u32 prev; 125 u32 prev;
126 126
127 spin_lock_irqsave(ATOMIC_HASH(addr), flags); 127 spin_lock_irqsave(ATOMIC_HASH(ptr), flags);
128 if ((prev = *ptr) == old) 128 if ((prev = *ptr) == old)
129 *ptr = new; 129 *ptr = new;
130 spin_unlock_irqrestore(ATOMIC_HASH(addr), flags); 130 spin_unlock_irqrestore(ATOMIC_HASH(ptr), flags);
131 131
132 return (unsigned long)prev; 132 return (unsigned long)prev;
133} 133}
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:
2498 retl 2498 retl
2499 nop 2499 nop
2500 .size sun4v_vintr_set_target, .-sun4v_vintr_set_target 2500 .size sun4v_vintr_set_target, .-sun4v_vintr_set_target
2501
2502 /* %o0: NCS sub-function
2503 * %o1: sub-function arg real-address
2504 * %o2: sub-function arg size
2505 *
2506 * returns %o0: status
2507 */
2508 .globl sun4v_ncs_request
2509 .type sun4v_ncs_request,#function
2510sun4v_ncs_request:
2511 mov HV_FAST_NCS_REQUEST, %o5
2512 ta HV_FAST_TRAP
2513 retl
2514 nop
2515 .size sun4v_ncs_request, .-sun4v_ncs_request
2516
2517 .globl sun4v_scv_send
2518 .type sun4v_scv_send,#function
2519sun4v_scv_send:
2520 save %sp, -192, %sp
2521 mov %i0, %o0
2522 mov %i1, %o1
2523 mov %i2, %o2
2524 mov HV_FAST_SVC_SEND, %o5
2525 ta HV_FAST_TRAP
2526 stx %o1, [%i3]
2527 ret
2528 restore
2529 .size sun4v_scv_send, .-sun4v_scv_send
2530
2531 .globl sun4v_scv_recv
2532 .type sun4v_scv_recv,#function
2533sun4v_scv_recv:
2534 save %sp, -192, %sp
2535 mov %i0, %o0
2536 mov %i1, %o1
2537 mov %i2, %o2
2538 mov HV_FAST_SVC_RECV, %o5
2539 ta HV_FAST_TRAP
2540 stx %o1, [%i3]
2541 ret
2542 restore
2543 .size sun4v_scv_recv, .-sun4v_scv_recv
2544
2545 .globl sun4v_scv_getstatus
2546 .type sun4v_scv_getstatus,#function
2547sun4v_scv_getstatus:
2548 mov HV_FAST_SVC_GETSTATUS, %o5
2549 mov %o1, %o4
2550 ta HV_FAST_TRAP
2551 stx %o1, [%o4]
2552 retl
2553 nop
2554 .size sun4v_scv_getstatus, .-sun4v_scv_getstatus
2555
2556 .globl sun4v_scv_setstatus
2557 .type sun4v_scv_setstatus,#function
2558sun4v_scv_setstatus:
2559 mov HV_FAST_SVC_SETSTATUS, %o5
2560 ta HV_FAST_TRAP
2561 retl
2562 nop
2563 .size sun4v_scv_setstatus, .-sun4v_scv_setstatus
2564
2565 .globl sun4v_scv_clrstatus
2566 .type sun4v_scv_clrstatus,#function
2567sun4v_scv_clrstatus:
2568 mov HV_FAST_SVC_CLRSTATUS, %o5
2569 ta HV_FAST_TRAP
2570 retl
2571 nop
2572 .size sun4v_scv_clrstatus, .-sun4v_scv_clrstatus