Re: Can we kill f inb_p, outb_p and other random I/O on port 0x80,in 2.6?

From: Alan Cox
Date: Mon Sep 22 2003 - 19:24:36 EST


On Llu, 2003-09-22 at 20:00, Jamie Lokier wrote:
> > CS5520 is one example. Also VIA VP2 seems to care but only very very
> > occasionally. On my 386 board its reliably borked without the delays
> > (not sure what chipset and its ISA so harder to tell)
>
> Yeah, but what's the problem and can it be detected? :)

You get bogus results

> I'm wondering if there's a way to detect how much udelay is needed on
> a particular board, and reduce or remove it on boards where it isn't
> needed.

8 ISA cycles will be nice and safe - see the specification for the ISA
bus. Its a nice easy known value and the way we moved various drivers to
udelay that used isa delay cycles for timing loops

> udelay() is also unreliable nowadays, due to CPUs changing clock
> speeds according to the whims of the BIOS. On laptops, even the rdtsc
> rate varies. If the delay is critical to system reliability for
> unknown reasons, then switching to udelay() removes some of that "we
> always did this and it fixed the unknown problems" legacy driver safety

Delaying too long is ok, delaying too little isnt good but as you say
most modern hw seems not to care.


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