[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <478E57C8.2080403@davidnewall.com>
Date: Thu, 17 Jan 2008 05:45:20 +1030
From: David Newall <davidn@...idnewall.com>
To: Alan Cox <alan@...rguk.ukuu.org.uk>
CC: "David P. Reed" <dpreed@...d.com>,
David Woodhouse <dwmw2@...radead.org>,
Rene Herman <rene.herman@...access.nl>,
Zachary Amsden <zach@...are.com>,
"H. Peter Anvin" <hpa@...or.com>,
Christer Weinigel <christer@...nigel.se>,
Ondrej Zary <linux@...nbow-software.org>,
Bodo Eggert <7eggert@....de>, Ingo Molnar <mingo@...e.hu>,
Paul Rolland <rol@...917.net>, Pavel Machek <pavel@....cz>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
rol <rol@...be.net>
Subject: Re: Re: [PATCH] x86: provide a DMI based port 0x80
I/O delay override.
Alan Cox wrote:
> On Thu, 17 Jan 2008 01:06:24 +1030
> David Newall <davidn@...idnewall.com> wrote:
>
>
>> This use of port 80 (or insert some other random number) is a croc of
>> hackery of the most inexperienced kind.
>>
>
> Wrong. It's a careful designed solution used by all sorts of code for
> over 15 years.
>
It's not careful: it's a croc. It's an ugly hack, an abuse of process,
and totally unnecessary. Read my comment about delays (next).
> The task to be performed is to delay for some period
>
> Wrong, it is for some number of bus clocks which is why I/O cycles are
> used
>
Wrong. It's a delay. It's a delay measured in I/O cycles, but still a
delay. Doing I/O to get a delay, even if the delay is intended to be
measured in I/O cycles, is hackery of the most inexperienced sort. It's
the sort of thing junior programmers get boxed in the ear for. There's
no satisfactory reason to do it that way.
If the hardware required an intermediate junk I/O, that would be a
reason to do one, but it doesn't, does it? It requires a delay. It's
written thus in all of the application notes.
>> that an OUT is used because you don't know how long the delay should be
>> on any specific machine. What rubbish.
>>
>
> Wrong again.
>
Wrong again. Of course one knows how long the delay should be. The bus
speed is known. The specifications of the hardware is known. Do the
math you (the programmer writing the driver, not Alan) lazy sluggard,
and use a delay. It baffles commonsense to say you don't know how long
it should be.
>> I won't even mention the many instances of these delays where no delay
>> is what properly is needed. Performance? Who cares about performance?
>>
>
> Correctness, who needs correctness ?
Well, frankly, the development process could stand a little more of it.
The sooner we stop denying that this is a hack, the sooner we can fix it.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists