[PATCH 3/13] use cpu_relax() in busy loop

From: Chris Wright
Date: Thu Sep 18 2003 - 18:30:42 EST


Replace busy loop nop with cpu_relax().

===== drivers/block/ps2esdi.c 1.69 vs edited =====
--- 1.69/drivers/block/ps2esdi.c Wed Sep 10 18:18:39 2003
+++ edited/drivers/block/ps2esdi.c Thu Sep 18 10:45:34 2003
@@ -550,7 +550,8 @@
printk("%s: hard reset...\n", DEVICE_NAME);
outb_p(CTRL_HARD_RESET, ESDI_CONTROL);
expire = jiffies + 2*HZ;
- while (time_before(jiffies, expire));
+ while (time_before(jiffies, expire))
+ cpu_relax();
outb_p(1, ESDI_CONTROL);
} /* hard reset */


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/