lkml.org 
[lkml]   [2003]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 5/13] use cpu_relax() in busy loop
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.073 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site