lkml.org 
[lkml]   [2006]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH -mm 2/6] cpu_relax(): ide_wait_stat()

Add cpu_relax() to drivers/ide/ide-iops.c/ide_wait_stat().
Tiny whitespace fix.


Should be quite useful.

Tested on 2.6.17-mm1.

Signed-off-by: Andreas Mohr <andi@lisas.de>


diff -urN linux-2.6.17-mm1.orig/drivers/ide/ide-iops.c linux-2.6.17-mm1.my/drivers/ide/ide-iops.c
--- linux-2.6.17-mm1.orig/drivers/ide/ide-iops.c 2006-06-21 14:28:16.000000000 +0200
+++ linux-2.6.17-mm1.my/drivers/ide/ide-iops.c 2006-06-21 22:00:02.000000000 +0200
@@ -542,7 +542,7 @@
u8 stat;
int i;
unsigned long flags;
-
+
/* bail early if we've exceeded max_failures */
if (drive->max_failures && (drive->failures > drive->max_failures)) {
*startstop = ide_stopped;
@@ -554,6 +554,7 @@
local_irq_set(flags);
timeout += jiffies;
while ((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) {
+ cpu_relax();
if (time_after(jiffies, timeout)) {
/*
* One last read after the timeout in case
-
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: 2006-06-21 23:02    [W:0.309 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site