Cc: Paul Rolland <rol@...>, H. Peter Anvin <hpa@...>, Krzysztof Halasa <khc@...>, Pavel Machek <pavel@...>, Andi Kleen <andi@...>, Alan Cox <alan@...>, David P. Reed <dpreed@...>, <linux-kernel@...>, Thomas Gleixner <tglx@...>, Ingo Molnar <mingo@...>, <rol@...>
This particular discussion isn't about anything in general but solely about
the delay an outb_p gives you on x86 since what is under discussion is not
using an output to port 0x80 on that platform to generate it.
Because any possible outb_p delay should be synced to the bus-clock, not to
any wall-clock. Drivers that want to sync to wall-clock need to use an outb,
delay pair as you'd expect.
In the real world, driver authors aren't perfect and will have used outb_p
as a wall-clock delay which they have gotten away with since it's a nicely
specified delay in terms of the ISA/LPC clock and the ISA/LPC clock being
fairly (old) to very (new) constant.
The delay it gives is very close to 1 us on a spec ISA/LPC bus (*) and as
such, even though it may not be the right thing to do from an theoretical
standpoint, generally a udelay(1) is going to be a fine replacement from a
practical one -- as soon as we _can_ use udelay(), as I also wrote.
Rene.
(*) some local testing shows it to be almost exactly that for both out and
in on my own PC -- a little over. If anyone cares, see attached little test
program. The "little over" I don't worry about. 0 us delay is also fine for
me and if any code was _that_ fragile it would have broken long ago.