On 2012-04-03 22:08, Arnd Bergmann wrote: >>> +static void ep93xx_pata_wait_for_iordy(void __iomem *base) >>> +{ >>> + unsigned long deadline = jiffies + msecs_to_jiffies(1000); >>> + while (!ep93xx_pata_check_iordy(base) && >>> + time_is_before_jiffies(deadline)) >>> + cpu_relax(); >>> +} > > Much better for a delay than the previous version. However, it's > still a busy wait, which is bad for realtime behavior, especially > since this can potentially take many milliseconds. If possible, > it should have an msleep() or at least cond_resched() instead of > the cpu_relax(). Obviously that will only work when no spinlocks > are held. > Unfortunately, we can't use msleep() or cond_resched() here - ep93xx_pata_wait_for_iordy() is called from interrupt handler. Thanks, RP -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html