diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-13 15:49:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-13 15:49:55 -0400 |
commit | ab22c17cd2a9840b4457a656fd377c73ec4f518d (patch) | |
tree | fc44bbd01b8016246235ec648918ca7ff0593bed /arch | |
parent | ed8f425f546a2242a97f61fabcbe9e50a2559a19 (diff) | |
parent | f574c843191728d9407b766a027f779dcd27b272 (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
[IA64] fix siglock
Quoth Tony:
"I committed the fix for this last week prior to your -rc4 announcement
reminding us to give proper "Reported-by:" credit. This one should have
had:
Reported-by: Tony Ernst <tee@sgi.com>
and also
Much-useful-investigation-and-tracing-by: Hedi Berriche <hedi@sgi.com>
Much-useful-investigation-and-tracing-by: Petr Tesarik <ptesarik@novell.com>"
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ia64/kernel/fsys.S | 46 |
1 files changed, 39 insertions, 7 deletions
diff --git a/arch/ia64/kernel/fsys.S b/arch/ia64/kernel/fsys.S index 3567d54f8cee..471a1e783aca 100644 --- a/arch/ia64/kernel/fsys.S +++ b/arch/ia64/kernel/fsys.S | |||
@@ -424,14 +424,26 @@ EX(.fail_efault, ld8 r14=[r33]) // r14 <- *set | |||
424 | andcm r14=r14,r17 // filter out SIGKILL & SIGSTOP | 424 | andcm r14=r14,r17 // filter out SIGKILL & SIGSTOP |
425 | 425 | ||
426 | #ifdef CONFIG_SMP | 426 | #ifdef CONFIG_SMP |
427 | mov r17=1 | 427 | // __ticket_spin_trylock(r31) |
428 | ;; | 428 | ld4 r17=[r31] |
429 | cmpxchg4.acq r18=[r31],r17,ar.ccv // try to acquire the lock | ||
430 | mov r8=EINVAL // default to EINVAL | 429 | mov r8=EINVAL // default to EINVAL |
431 | ;; | 430 | ;; |
431 | extr r9=r17,17,15 | ||
432 | ;; | ||
433 | xor r18=r17,r9 | ||
434 | adds r19=1,r17 | ||
435 | ;; | ||
436 | extr.u r18=r18,0,15 | ||
437 | ;; | ||
438 | cmp.eq p0,p7=0,r18 | ||
439 | (p7) br.cond.spnt.many .lock_contention | ||
440 | mov.m ar.ccv=r17 | ||
441 | ;; | ||
442 | cmpxchg4.acq r9=[r31],r19,ar.ccv | ||
443 | ;; | ||
444 | cmp4.eq p0,p7=r9,r17 | ||
445 | (p7) br.cond.spnt.many .lock_contention | ||
432 | ld8 r3=[r2] // re-read current->blocked now that we hold the lock | 446 | ld8 r3=[r2] // re-read current->blocked now that we hold the lock |
433 | cmp4.ne p6,p0=r18,r0 | ||
434 | (p6) br.cond.spnt.many .lock_contention | ||
435 | ;; | 447 | ;; |
436 | #else | 448 | #else |
437 | ld8 r3=[r2] // re-read current->blocked now that we hold the lock | 449 | ld8 r3=[r2] // re-read current->blocked now that we hold the lock |
@@ -490,7 +502,17 @@ EX(.fail_efault, ld8 r14=[r33]) // r14 <- *set | |||
490 | (p6) br.cond.spnt.few 1b // yes -> retry | 502 | (p6) br.cond.spnt.few 1b // yes -> retry |
491 | 503 | ||
492 | #ifdef CONFIG_SMP | 504 | #ifdef CONFIG_SMP |
493 | st4.rel [r31]=r0 // release the lock | 505 | // __ticket_spin_unlock(r31) |
506 | adds r31=2,r31 | ||
507 | ;; | ||
508 | ld2.bias r2=[r31] | ||
509 | mov r3=65534 | ||
510 | ;; | ||
511 | adds r2=2,r2 | ||
512 | ;; | ||
513 | and r3=r3,r2 | ||
514 | ;; | ||
515 | st2.rel [r31]=r3 | ||
494 | #endif | 516 | #endif |
495 | SSM_PSR_I(p0, p9, r31) | 517 | SSM_PSR_I(p0, p9, r31) |
496 | ;; | 518 | ;; |
@@ -512,7 +534,17 @@ EX(.fail_efault, (p15) st8 [r34]=r3) | |||
512 | 534 | ||
513 | .sig_pending: | 535 | .sig_pending: |
514 | #ifdef CONFIG_SMP | 536 | #ifdef CONFIG_SMP |
515 | st4.rel [r31]=r0 // release the lock | 537 | // __ticket_spin_unlock(r31) |
538 | adds r31=2,r31 | ||
539 | ;; | ||
540 | ld2.bias r2=[r31] | ||
541 | mov r3=65534 | ||
542 | ;; | ||
543 | adds r2=2,r2 | ||
544 | ;; | ||
545 | and r3=r3,r2 | ||
546 | ;; | ||
547 | st2.rel [r31]=r3 | ||
516 | #endif | 548 | #endif |
517 | SSM_PSR_I(p0, p9, r17) | 549 | SSM_PSR_I(p0, p9, r17) |
518 | ;; | 550 | ;; |