]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
[IA64] Fix spinaphore down_spin()
authorTony Luck <tony.luck@intel.com>
Wed, 30 Jun 2010 17:46:16 +0000 (10:46 -0700)
committerTony Luck <tony.luck@intel.com>
Wed, 30 Jun 2010 17:46:16 +0000 (10:46 -0700)
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 883a3acf5b0d4782ac35981227a0d094e8b44850
    [IA64] Re-implement spinaphores using ticket lock concepts

Reported via IRC by Bjorn Helgaas

Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/mm/tlb.c

index 5dfd916e9ea610db1a047e0462d6398082bde63e..7b3cdc6c6d9147d3edd422ab31b97adf90e46f6c 100644 (file)
@@ -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();