Skip to content

Commit

Permalink
[IA64] Fix spinaphore down_spin()
Browse files Browse the repository at this point in the history
Typo in down_spin() meant it only read the low 32 bits of the
"serve" value, instead of the full 64 bits. This results in the
system hanging when the values in ticket/serve get larger than
32-bits. A big enough system running the right test can hit this
in a just a few hours.

Broken since 883a3ac
    [IA64] Re-implement spinaphores using ticket lock concepts

Reported via IRC by Bjorn Helgaas

Signed-off-by: Tony Luck <tony.luck@intel.com>
  • Loading branch information
Tony Luck committed Jun 30, 2010
1 parent 984bc96 commit b70f4e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/ia64/mm/tlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ static inline void down_spin(struct spinaphore *ss)
ia64_invala();

for (;;) {
asm volatile ("ld4.c.nc %0=[%1]" : "=r"(serve) : "r"(&ss->serve) : "memory");
asm volatile ("ld8.c.nc %0=[%1]" : "=r"(serve) : "r"(&ss->serve) : "memory");
if (time_before(t, serve))
return;
cpu_relax();
Expand Down

0 comments on commit b70f4e8

Please sign in to comment.