Commit bcf50865 authored by Tony Luck's avatar Tony Luck Committed by David Mosberger

[PATCH] ia64: infinite loop in ia64_mca_wakeup_ipi_wait

This bugfix has been hiding inside the MCA TLB patches.

There is an infinite loop in ia64_mca_wakeup_ipi_wait() because
the compiler optimizes away the test at the bottom of the while
loop.  It does this because IA64_MCA_WAKEUP_VECTOR is 0xf0, so
irr_bit is known to be the constant 0x30, a.k.a. 48 in decimal.
So when the compiler looks at the expression:


It observes that 1' as unsigned
long.
parent c2a5f235
...@@ -828,7 +828,7 @@ ia64_mca_wakeup_ipi_wait(void) ...@@ -828,7 +828,7 @@ ia64_mca_wakeup_ipi_wait(void)
irr = ia64_getreg(_IA64_REG_CR_IRR3); irr = ia64_getreg(_IA64_REG_CR_IRR3);
break; break;
} }
} while (!(irr & (1 << irr_bit))) ; } while (!(irr & (1UL << irr_bit))) ;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment