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

From: Chris Wright
Date: Thu Sep 18 2003 - 18:34:04 EST


Replace busy loop nop with cpu_relax().

===== drivers/char/isicom.c 1.25 vs edited =====
--- 1.25/drivers/char/isicom.c Mon Aug 18 10:39:47 2003
+++ edited/drivers/char/isicom.c Thu Sep 18 10:54:12 2003
@@ -153,12 +153,14 @@

inw(base+0x8);

- for(i=jiffies+HZ/100;time_before(jiffies, i););
+ for(i=jiffies+HZ/100;time_before(jiffies, i);)
+ cpu_relax();

outw(0,base+0x8); /* Reset */

for(j=1;j<=3;j++) {
- for(i=jiffies+HZ;time_before(jiffies, i););
+ for(i=jiffies+HZ;time_before(jiffies, i);)
+ cpu_relax();
printk(".");
}
signature=(inw(base+0x4)) & 0xff;

-
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/