提交 b70f4e85 编写于 作者: T Tony Luck

[IA64] Fix spinaphore down_spin()

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 883a3acf
    [IA64] Re-implement spinaphores using ticket lock concepts

Reported via IRC by Bjorn Helgaas
Signed-off-by: NTony Luck <tony.luck@intel.com>
上级 984bc960
...@@ -121,7 +121,7 @@ static inline void down_spin(struct spinaphore *ss) ...@@ -121,7 +121,7 @@ static inline void down_spin(struct spinaphore *ss)
ia64_invala(); ia64_invala();
for (;;) { 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)) if (time_before(t, serve))
return; return;
cpu_relax(); cpu_relax();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册