* [PATCH] Fix the x86_64 implementation of call_rwsem_wait()
@ 2010-05-04 12:42 David Howells
2010-05-04 18:33 ` [tip:x86/urgent] x86-64: Use the proper register width in call_rwsem_wait() tip-bot for David Howells
0 siblings, 1 reply; 2+ messages in thread
From: David Howells @ 2010-05-04 12:42 UTC (permalink / raw)
To: torvalds, akpm, hpa; +Cc: dhowells, x86, linux-kernel
The x86_64 call_rwsem_wait() treats the active state counter part of the R/W
semaphore state as being 16-bit when it's actually 32-bit (it's half of the
64-bit state). It should do "decl %edx" not "decw %dx".
Signed-off-by: David Howells <dhowells@redhat.com>
---
arch/x86/lib/rwsem_64.S | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/lib/rwsem_64.S b/arch/x86/lib/rwsem_64.S
index 15acecf..41fcf00 100644
--- a/arch/x86/lib/rwsem_64.S
+++ b/arch/x86/lib/rwsem_64.S
@@ -60,7 +60,7 @@ ENTRY(call_rwsem_down_write_failed)
ENDPROC(call_rwsem_down_write_failed)
ENTRY(call_rwsem_wake)
- decw %dx /* do nothing if still outstanding active readers */
+ decl %edx /* do nothing if still outstanding active readers */
jnz 1f
save_common_regs
movq %rax,%rdi
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [tip:x86/urgent] x86-64: Use the proper register width in call_rwsem_wait()
2010-05-04 12:42 [PATCH] Fix the x86_64 implementation of call_rwsem_wait() David Howells
@ 2010-05-04 18:33 ` tip-bot for David Howells
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for David Howells @ 2010-05-04 18:33 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, dhowells, tglx
Commit-ID: 50db45f2f010e9251dae644c5fb86b321d9ac815
Gitweb: http://git.kernel.org/tip/50db45f2f010e9251dae644c5fb86b321d9ac815
Author: David Howells <dhowells@redhat.com>
AuthorDate: Tue, 4 May 2010 13:42:53 +0100
Committer: H. Peter Anvin <hpa@zytor.com>
CommitDate: Tue, 4 May 2010 10:15:54 -0700
x86-64: Use the proper register width in call_rwsem_wait()
The x86_64 call_rwsem_wait() treats the active state counter part of the R/W
semaphore state as being 16-bit when it's actually 32-bit (it's half of the
64-bit state). It should do "decl %edx" not "decw %dx".
[ hpa note: decl %edx will clear the upper half of %rdx, but the value of
%rdx is dead after this point so that is OK. ]
Signed-off-by: David Howells <dhowells@redhat.com>
LKML-Reference: <20100504124253.30994.79841.stgit@warthog.procyon.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
arch/x86/lib/rwsem_64.S | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/lib/rwsem_64.S b/arch/x86/lib/rwsem_64.S
index 15acecf..41fcf00 100644
--- a/arch/x86/lib/rwsem_64.S
+++ b/arch/x86/lib/rwsem_64.S
@@ -60,7 +60,7 @@ ENTRY(call_rwsem_down_write_failed)
ENDPROC(call_rwsem_down_write_failed)
ENTRY(call_rwsem_wake)
- decw %dx /* do nothing if still outstanding active readers */
+ decl %edx /* do nothing if still outstanding active readers */
jnz 1f
save_common_regs
movq %rax,%rdi
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-05-04 18:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-04 12:42 [PATCH] Fix the x86_64 implementation of call_rwsem_wait() David Howells
2010-05-04 18:33 ` [tip:x86/urgent] x86-64: Use the proper register width in call_rwsem_wait() tip-bot for David Howells
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox