]> git.hungrycats.org Git - linux/commitdiff
[PATCH] ia64: infinite loop in ia64_mca_wakeup_ipi_wait
authorTony Luck <tony.luck@intel.com>
Mon, 13 Oct 2003 07:02:43 +0000 (00:02 -0700)
committerDavid Mosberger <davidm@tiger.hpl.hp.com>
Mon, 13 Oct 2003 07:02:43 +0000 (00:02 -0700)
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.

arch/ia64/kernel/mca.c

index 7986b6d52b74c202361b0e135b1e45f06697efda..a879faedcfdc780d68ab3240cde0391cd5454921 100644 (file)
@@ -828,7 +828,7 @@ ia64_mca_wakeup_ipi_wait(void)
                        irr = ia64_getreg(_IA64_REG_CR_IRR3);
                        break;
                }
-       } while (!(irr & (1 << irr_bit))) ;
+       } while (!(irr & (1UL << irr_bit))) ;
 }
 
 /*