Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 199330
b: refs/heads/master
c: f4c0346
h: refs/heads/master
v: v3
  • Loading branch information
John David Anglin authored and Kyle McMartin committed May 30, 2010
1 parent a229508 commit b1e5775
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 24 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c2dc988ec566429841dd83644479aca78a6251e7
refs/heads/master: f4c0346c6f350d51aac7ed87e266a4257bdbe506
32 changes: 9 additions & 23 deletions trunk/arch/parisc/kernel/syscall.S
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,17 @@ ENTRY(linux_gateway_page)
KILL_INSN
.endr

/* ADDRESS 0xb0 to 0xb4, lws uses 1 insns for entry */
/* ADDRESS 0xb0 to 0xb8, lws uses two insns for entry */
/* Light-weight-syscall entry must always be located at 0xb0 */
/* WARNING: Keep this number updated with table size changes */
#define __NR_lws_entries (2)

lws_entry:
/* Unconditional branch to lws_start, located on the
same gateway page */
b,n lws_start
gate lws_start, %r0 /* increase privilege */
depi 3, 31, 2, %r31 /* Ensure we return into user mode. */

/* Fill from 0xb4 to 0xe0 */
.rept 11
/* Fill from 0xb8 to 0xe0 */
.rept 10
KILL_INSN
.endr

Expand Down Expand Up @@ -423,9 +422,6 @@ tracesys_sigexit:
*********************************************************/
lws_start:
/* Gate and ensure we return to userspace */
gate .+8, %r0
depi 3, 31, 2, %r31 /* Ensure we return to userspace */

#ifdef CONFIG_64BIT
/* FIXME: If we are a 64-bit kernel just
Expand All @@ -442,7 +438,7 @@ lws_start:
#endif

/* Is the lws entry number valid? */
comiclr,>>= __NR_lws_entries, %r20, %r0
comiclr,>> __NR_lws_entries, %r20, %r0
b,n lws_exit_nosys

/* WARNING: Trashing sr2 and sr3 */
Expand Down Expand Up @@ -473,7 +469,7 @@ lws_exit:
/* now reset the lowest bit of sp if it was set */
xor %r30,%r1,%r30
#endif
be,n 0(%sr3, %r31)
be,n 0(%sr7, %r31)



Expand Down Expand Up @@ -529,7 +525,6 @@ lws_compare_and_swap32:
#endif

lws_compare_and_swap:
#ifdef CONFIG_SMP
/* Load start of lock table */
ldil L%lws_lock_start, %r20
ldo R%lws_lock_start(%r20), %r28
Expand Down Expand Up @@ -572,8 +567,6 @@ cas_wouldblock:
ldo 2(%r0), %r28 /* 2nd case */
b lws_exit /* Contended... */
ldo -EAGAIN(%r0), %r21 /* Spin in userspace */
#endif
/* CONFIG_SMP */

/*
prev = *addr;
Expand Down Expand Up @@ -601,26 +594,22 @@ cas_action:
1: ldw 0(%sr3,%r26), %r28
sub,<> %r28, %r25, %r0
2: stw %r24, 0(%sr3,%r26)
#ifdef CONFIG_SMP
/* Free lock */
stw %r20, 0(%sr2,%r20)
# if ENABLE_LWS_DEBUG
#if ENABLE_LWS_DEBUG
/* Clear thread register indicator */
stw %r0, 4(%sr2,%r20)
# endif
#endif
/* Return to userspace, set no error */
b lws_exit
copy %r0, %r21

3:
/* Error occured on load or store */
#ifdef CONFIG_SMP
/* Free lock */
stw %r20, 0(%sr2,%r20)
# if ENABLE_LWS_DEBUG
#if ENABLE_LWS_DEBUG
stw %r0, 4(%sr2,%r20)
# endif
#endif
b lws_exit
ldo -EFAULT(%r0),%r21 /* set errno */
Expand Down Expand Up @@ -672,7 +661,6 @@ ENTRY(sys_call_table64)
END(sys_call_table64)
#endif

#ifdef CONFIG_SMP
/*
All light-weight-syscall atomic operations
will use this set of locks
Expand All @@ -694,8 +682,6 @@ ENTRY(lws_lock_start)
.endr
END(lws_lock_start)
.previous
#endif
/* CONFIG_SMP for lws_lock_start */

.end

Expand Down

0 comments on commit b1e5775

Please sign in to comment.