This patch based on an original version by H. Peter Anvin fixed the buggy timeout warning logic in tboot. Signed-off-by: Shane Wang diff -r 0edd117ada44 arch/x86/kernel/tboot.c --- a/arch/x86/kernel/tboot.c Wed Sep 23 10:06:56 2009 -0700 +++ b/arch/x86/kernel/tboot.c Mon Sep 28 07:42:18 2009 -0700 @@ -301,16 +301,17 @@ static int tboot_wait_for_aps(int num_ap unsigned long timeout; timeout = AP_WAIT_TIMEOUT*HZ; - while (atomic_read((atomic_t *)&tboot->num_in_wfs) != num_aps && - timeout) { + while (timeout) { + if (atomic_read((atomic_t *)&tboot->num_in_wfs) == num_aps) + break; mdelay(1); timeout--; } - if (timeout) + if (!timeout) pr_warning("tboot wait for APs timeout\n"); - return !(atomic_read((atomic_t *)&tboot->num_in_wfs) == num_aps); + return !timeout; } static int __cpuinit tboot_cpu_callback(struct notifier_block *nfb,