LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
       [not found]         ` <fa.97XrGLIGlvAy4P/TB5vHHrfBrIw@ifi.uio.no>
@ 2008-01-10  0:37           ` Robert Hancock
  2008-01-10  0:44             ` Rene Herman
  0 siblings, 1 reply; 61+ messages in thread
From: Robert Hancock @ 2008-01-10  0:37 UTC (permalink / raw)
  To: David P. Reed
  Cc: Christer Weinigel, Zachary Amsden, Avi Kivity, Ondrej Zary,
	H. Peter Anvin, Rene Herman, Bodo Eggert, Ingo Molnar, Alan Cox,
	Paul Rolland, Pavel Machek, Thomas Gleixner, linux-kernel,
	Ingo Molnar, rol

David P. Reed wrote:
> Christer Weinigel wrote:
>>
>> Did I miss anyting?
>>
>>   
> Nothing that seems *crucial* going forward for Linux.  The fate of
> "legacy machines" is really important to get right.
> 
> I have a small suggestion in mind that might be helpful in the future:
> the  "motherboard resources" discovered as PNP0C02 devices in their _CRS
> settings in ACPI during ACPI PnP startup should be reserved (or
> checked), and any drivers that still use port 80 implicitly should
> reserve that port.

I agree. In this case the BIOS on these laptops is trying to tell us 
"port 80 is used for our purposes, do not touch it". We should be listening.

-- 
Robert Hancock      Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@nospamshaw.ca
Home Page: http://www.roberthancock.com/


^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-10  0:37           ` [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override Robert Hancock
@ 2008-01-10  0:44             ` Rene Herman
  2008-01-10 14:41               ` David P. Reed
  0 siblings, 1 reply; 61+ messages in thread
From: Rene Herman @ 2008-01-10  0:44 UTC (permalink / raw)
  To: Robert Hancock
  Cc: David P. Reed, Christer Weinigel, Zachary Amsden, Avi Kivity,
	Ondrej Zary, H. Peter Anvin, Bodo Eggert, Ingo Molnar, Alan Cox,
	Paul Rolland, Pavel Machek, Thomas Gleixner, linux-kernel,
	Ingo Molnar, rol

On 10-01-08 01:37, Robert Hancock wrote:

> David P. Reed wrote:

>> I have a small suggestion in mind that might be helpful in the future:
>> the  "motherboard resources" discovered as PNP0C02 devices in their _CRS
>> settings in ACPI during ACPI PnP startup should be reserved (or
>> checked), and any drivers that still use port 80 implicitly should
>> reserve that port.
> 
> I agree. In this case the BIOS on these laptops is trying to tell us 
> "port 80 is used for our purposes, do not touch it". We should be 
> listening.

Listening is fine but what are you going to do after you have listened? 
Right, not use port 0x80 but since that's the current idea anyway outside of 
legacy drivers, you don't actually need to listen.

If the quirk-to-0xed or similar was to stay, it's a much better switching 
point than DMI strings but if not, it's not actually important.

Rene.

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-10  0:44             ` Rene Herman
@ 2008-01-10 14:41               ` David P. Reed
  0 siblings, 0 replies; 61+ messages in thread
From: David P. Reed @ 2008-01-10 14:41 UTC (permalink / raw)
  To: Rene Herman
  Cc: Robert Hancock, Christer Weinigel, Zachary Amsden, Avi Kivity,
	Ondrej Zary, H. Peter Anvin, Bodo Eggert, Ingo Molnar, Alan Cox,
	Paul Rolland, Pavel Machek, Thomas Gleixner, linux-kernel,
	Ingo Molnar, rol


Rene Herman wrote:
> On 10-01-08 01:37, Robert Hancock wrote:
>>
>> I agree. In this case the BIOS on these laptops is trying to tell us 
>> "port 80 is used for our purposes, do not touch it". We should be 
>> listening.
>
> Listening is fine but what are you going to do after you have 
> listened? Right, not use port 0x80 but since that's the current idea 
> anyway outside of legacy drivers, you don't actually need to listen.
>
> If the quirk-to-0xed or similar was to stay, it's a much better 
> switching point than DMI strings but if not, it's not actually important.
Well, I was just suggesting a warning that would come up when a driver 
that still used port 80 was initialized...
I think that is what Alan Cox and others suggest for legacy drivers that 
have worked - I agree that it may not be the right thing to screw them 
up, especially since my laptop, and probably most machines that might 
start using port 80 or other "legacy ports" won't ever need those drivers.

I thought more about a complete solution last night.   A clean idea that 
really fits the linux design might be the following outline of a patch. 
I suspect it might seem far less ugly, and probably would meet Alan 
Cox's needs, too - I am very sympathetic about not breaking 8390's, etc.

Define a "motherboard resources" driver that claims all the resources 
defined for PNP0C02 devices during the pnp process.   I think Windoze 
actually does something quite similar.   This would claim port 80.

Define an iodelay driver.  This driver exists largely to claim port 80 
for the iodelay operation  (you could even define an option for other 
ports).  Legacy drivers would be modified to require iodelay.  The 
iodelay driver would set up the iodelay mechanism to do something other 
than the "boot time" default - which could be no delay, or udelay.  It 
would also set a flag that says "_b operations are safe".

Put a WARN_ONCE() in the in/out*_b operations that checks the flag that 
is set by the iodelay driver.  This would only trigger in the case that 
80 or whatever was reserved by some other device driver - such as the 
motherboard resources driver above.  Modern machines won't do that.

Finally, anything that happens before the motherboard resources and 
iodelay drivers are initialized cannot use in*_p or out*_p (whether they 
can be loadable modules rather than built in is a question).  This is a 
very small set, and I believe with the exception of the PIT (8253/4) are 
very safe.

Note that this idea is also compatible with rewriting all drivers to use 
"iodelay()" explicitly instead of _p().  But it doesn't require that.

>
> Rene.
>

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-18 13:37                                                                                               ` David Newall
@ 2008-01-18 14:05                                                                                                 ` Rene Herman
  0 siblings, 0 replies; 61+ messages in thread
From: Rene Herman @ 2008-01-18 14:05 UTC (permalink / raw)
  To: David Newall
  Cc: Alan Cox, David P. Reed, David Woodhouse, Zachary Amsden,
	H. Peter Anvin, Christer Weinigel, Ondrej Zary, Bodo Eggert,
	Ingo Molnar, Paul Rolland, Pavel Machek, Thomas Gleixner,
	linux-kernel, Ingo Molnar, rol

On 18-01-08 14:37, David Newall wrote:

> The problem is that _p is widely used for non-ISA devices.

Yes, we know, it's being fixed. Piss off.

Rene.

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-17 22:13                                                                                             ` Rene Herman
@ 2008-01-18 13:37                                                                                               ` David Newall
  2008-01-18 14:05                                                                                                 ` Rene Herman
  0 siblings, 1 reply; 61+ messages in thread
From: David Newall @ 2008-01-18 13:37 UTC (permalink / raw)
  To: Rene Herman
  Cc: Alan Cox, David P. Reed, David Woodhouse, Zachary Amsden,
	H. Peter Anvin, Christer Weinigel, Ondrej Zary, Bodo Eggert,
	Ingo Molnar, Paul Rolland, Pavel Machek, Thomas Gleixner,
	linux-kernel, Ingo Molnar, rol

Rene,

Here is why you shouldn't leap so quickly to rudeness.  Everything is
being repeated over and over and over again (as you put it) because
people like you shout down people like me without making any apparent
effort to understand the truth of the problem.


Rene Herman wrote:
> We've already talked about ISA bus speed, and how it's not in a sane
> sense portably determinable, we've already talked about kernel
> parameters, about udelay and it's usefulness in early boot, about how
> your rude "Junk I/O" is exactly what is needed for some ISA devices
> and so on...

The problem is that _p is widely used for non-ISA devices.  For example,
a quick grep reveals the following (and more) all use outb_p:

    ./i2c/busses/i2c-amd756.c
    ./i2c/busses/i2c-ali1535.c
    ./i2c/busses/i2c-ali15x3.c
    ./i2c/busses/i2c-i801.c
    ./i2c/busses/i2c-piix4.c
    ./i2c/busses/i2c-viapro.c
    ./i2c/busses/i2c-nforce2.c
    ./i2c/busses/i2c-ali1563.c
    ./telephony/ixj.c
    ./char/pc8736x_gpio.c
    ./char/epca.c
    ./char/dtlk.c
    ./char/watchdog/w83697hf_wdt.c
    ./char/watchdog/wafer5823wdt.c
    ./char/watchdog/wdt.c
    ./char/watchdog/sc1200wdt.c
    ./char/watchdog/pc87413_wdt.c
    ./char/watchdog/wdt_pci.c
    ./char/watchdog/w83977f_wdt.c
    ./char/watchdog/pcwd_pci.c
    ./char/watchdog/w83877f_wdt.c
    ./char/watchdog/mixcomwd.c
    ./char/watchdog/w83627hf_wdt.c
    ./char/watchdog/advantechwdt.c
    ./char/watchdog/ib700wdt.c
    ./char/watchdog/pcwd.c
    ./char/watchdog/wdt977.c
    ./char/rocket_int.h
    ./char/sonypi.c


Most of these go nowhere near the ISA bus.  This has been said before,
but perhaps you missed that.  Which is another reason to use good
manners, isn't it?

The argument that you can't know how long to delay is utter rubbish.

> In fact, we're blue in the face from talking about it. So say
> something useful or go away. 

I think I'm saying something useful.  I'll keep an eye out for your
humble apology.  (Are you big enough to give one?)   In the mean time,
perhaps you'll follow your own advice and say something useful or go
away.  :-p

I hope you'll see this in the positive and constructive light that it is
intended.

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-17 21:58                                                                                           ` David Newall
@ 2008-01-17 22:13                                                                                             ` Rene Herman
  2008-01-18 13:37                                                                                               ` David Newall
  0 siblings, 1 reply; 61+ messages in thread
From: Rene Herman @ 2008-01-17 22:13 UTC (permalink / raw)
  To: David Newall
  Cc: Alan Cox, David P. Reed, David Woodhouse, Zachary Amsden,
	H. Peter Anvin, Christer Weinigel, Ondrej Zary, Bodo Eggert,
	Ingo Molnar, Paul Rolland, Pavel Machek, Thomas Gleixner,
	linux-kernel, Ingo Molnar, rol

On 17-01-08 22:58, David Newall wrote:

> Rene Herman wrote:

>> Over the course of a 100 messages or so in this thread it's been
>> determined that the best course of action is to keep the out for ISA
>> and replace it with udelay() for chipset logic. Now go away. 
> 
> Rather than this incredible rudeness, why don't you direct your energy
> towards convincing Alan of this.  He's the hold-out.

No he isn't and that's why I'm rude -- everything needs to be repeated over 
and over and over again. Read the thread(s). You didn't limit your reply to 
chipset logic and Alan even already submitted patches to isolate the delay 
for the chipset logic (PIC and PIT that is) where the expectation is that a 
simple udelay() will suffice.

We've already talked about ISA bus speed, and how it's not in a sane sense 
portably determinable, we've already talked about kernel parameters, about 
udelay and it's usefulness in early boot, about how your rude "Junk I/O" is 
exactly what is needed for some ISA devices and so on...

In fact, we're blue in the face from talking about it. So say something 
useful or go away.

Rene

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-17 13:55                                                                                         ` Rene Herman
@ 2008-01-17 21:58                                                                                           ` David Newall
  2008-01-17 22:13                                                                                             ` Rene Herman
  0 siblings, 1 reply; 61+ messages in thread
From: David Newall @ 2008-01-17 21:58 UTC (permalink / raw)
  To: Rene Herman
  Cc: Alan Cox, David P. Reed, David Woodhouse, Zachary Amsden,
	H. Peter Anvin, Christer Weinigel, Ondrej Zary, Bodo Eggert,
	Ingo Molnar, Paul Rolland, Pavel Machek, Thomas Gleixner,
	linux-kernel, Ingo Molnar, rol

Rene Herman wrote:
> Over the course of a 100 messages or so in this thread it's been
> determined that the best course of action is to keep the out for ISA
> and replace it with udelay() for chipset logic. Now go away. 

Rather than this incredible rudeness, why don't you direct your energy
towards convincing Alan of this.  He's the hold-out.

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-17 13:36                                                                                       ` David Newall
  2008-01-17 13:55                                                                                         ` Rene Herman
@ 2008-01-17 15:51                                                                                         ` Alan Cox
  1 sibling, 0 replies; 61+ messages in thread
From: Alan Cox @ 2008-01-17 15:51 UTC (permalink / raw)
  To: David Newall
  Cc: David P. Reed, David Woodhouse, Rene Herman, Zachary Amsden,
	H. Peter Anvin, Christer Weinigel, Ondrej Zary, Bodo Eggert,
	Ingo Molnar, Paul Rolland, Pavel Machek, Thomas Gleixner,
	linux-kernel, Ingo Molnar, rol

> In the early days of clone PCs, as you know but perhaps many on this
> list might not, the bus speed could be changed, but this was
> user-selectable.  For such a machine, delay values can be pre-calculated
> for each bus speed, and a kernel parameter set accordingly.  Or are you
> saying that the characteristics of the bus on a given machine vary for
> reasons other than user selection?

They vary based on the CPU clock, the dividers from PCI to ISA on PCI
based boxes, and on the ISA only ones often on the CPU speed.

Unfortunately the way you control that divider or read it is chipset
specific. Nor would it be reasonable to expect the end user to set it.

For PC/104 systems the same applies today.

> The question is, for a given machine, can we determine a delay value
> instead of using a junk I/O?

The question (for ISA peripherals) is "why bother", and with the 8390
patch there are one or two dubious PCI driver users of _p left but not
much else that isn't ISA or chipset logic. The question for chipset logic
where it has become integrated is "can we get rid of it for some devices,
if not what can we use instead"

Alan

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-17 13:36                                                                                       ` David Newall
@ 2008-01-17 13:55                                                                                         ` Rene Herman
  2008-01-17 21:58                                                                                           ` David Newall
  2008-01-17 15:51                                                                                         ` Alan Cox
  1 sibling, 1 reply; 61+ messages in thread
From: Rene Herman @ 2008-01-17 13:55 UTC (permalink / raw)
  To: David Newall
  Cc: Alan Cox, David P. Reed, David Woodhouse, Zachary Amsden,
	H. Peter Anvin, Christer Weinigel, Ondrej Zary, Bodo Eggert,
	Ingo Molnar, Paul Rolland, Pavel Machek, Thomas Gleixner,
	linux-kernel, Ingo Molnar, rol

On 17-01-08 14:36, David Newall wrote:

> In the early days of clone PCs, as you know but perhaps many on this
> list might not

I'm so incredibly sick of this fucking thread. We've had enough legacy farts 
coming out of the woodwork advertising their own massive experience and 
cluelessness by now. Both hpa and alan are in this thread and everyone else 
can be ignored on the issue.

Over the course of a 100 messages or so in this thread it's been determined 
that the best course of action is to keep the out for ISA and replace it 
with udelay() for chipset logic. Now go away.

Rene.

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-17 12:02                                                                                     ` Alan Cox
@ 2008-01-17 13:36                                                                                       ` David Newall
  2008-01-17 13:55                                                                                         ` Rene Herman
  2008-01-17 15:51                                                                                         ` Alan Cox
  0 siblings, 2 replies; 61+ messages in thread
From: David Newall @ 2008-01-17 13:36 UTC (permalink / raw)
  To: Alan Cox
  Cc: David P. Reed, David Woodhouse, Rene Herman, Zachary Amsden,
	H. Peter Anvin, Christer Weinigel, Ondrej Zary, Bodo Eggert,
	Ingo Molnar, Paul Rolland, Pavel Machek, Thomas Gleixner,
	linux-kernel, Ingo Molnar, rol

Alan Cox wrote:
>> This is a timing issue, isn't it?  How are we synchronising, other than
>> by delaying for a (bus-dependant) period?  The characteristics of each
>> bus are known so a number can be assigned for "one bus cycle", without
>> having to use the bus.
>>     
>
> The characteristics of the bus are not known. It could be anything
> between 6 and about 16MHz.

In the early days of clone PCs, as you know but perhaps many on this
list might not, the bus speed could be changed, but this was
user-selectable.  For such a machine, delay values can be pre-calculated
for each bus speed, and a kernel parameter set accordingly.  Or are you
saying that the characteristics of the bus on a given machine vary for
reasons other than user selection?

The fact that busses run at different speeds on different machines is
not a problem because the delay value can be determined for each given
machine.

The question is, for a given machine, can we determine a delay value
instead of using a junk I/O?

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-17  6:25                                                                                   ` David Newall
@ 2008-01-17 12:02                                                                                     ` Alan Cox
  2008-01-17 13:36                                                                                       ` David Newall
  0 siblings, 1 reply; 61+ messages in thread
From: Alan Cox @ 2008-01-17 12:02 UTC (permalink / raw)
  To: David Newall
  Cc: David P. Reed, David Woodhouse, Rene Herman, Zachary Amsden,
	H. Peter Anvin, Christer Weinigel, Ondrej Zary, Bodo Eggert,
	Ingo Molnar, Paul Rolland, Pavel Machek, Thomas Gleixner,
	linux-kernel, Ingo Molnar, rol

> This is a timing issue, isn't it?  How are we synchronising, other than
> by delaying for a (bus-dependant) period?  The characteristics of each
> bus are known so a number can be assigned for "one bus cycle", without
> having to use the bus.

The characteristics of the bus are not known. It could be anything
between 6 and about 16MHz. The way you read the bus clock is system
dependant.

The underlying problem is really that over time some of the hardware has
moved from the ISA world into the chipsets. That is why I sent Ingo the
patches for inb_pit/inb_pic and to split ISA 8390 and non ISA 8390
support. Someone has to tackle the CMOS but we are then in a position to
relegant port 0x80 timing use to ISA systems where it is fine.

Alan

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-16 20:08                                                                                 ` Alan Cox
@ 2008-01-17  6:25                                                                                   ` David Newall
  2008-01-17 12:02                                                                                     ` Alan Cox
  0 siblings, 1 reply; 61+ messages in thread
From: David Newall @ 2008-01-17  6:25 UTC (permalink / raw)
  To: Alan Cox
  Cc: David P. Reed, David Woodhouse, Rene Herman, Zachary Amsden,
	H. Peter Anvin, Christer Weinigel, Ondrej Zary, Bodo Eggert,
	Ingo Molnar, Paul Rolland, Pavel Machek, Thomas Gleixner,
	linux-kernel, Ingo Molnar, rol

Alan Cox wrote:
>> 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.
>>     
>
> And the only instruction that is synchronized to the bus in question is
> an I/O instruction.
>   

This is a timing issue, isn't it?  How are we synchronising, other than
by delaying for a (bus-dependant) period?  The characteristics of each
bus are known so a number can be assigned for "one bus cycle", without
having to use the bus.



>> Wrong again.  Of course one knows how long the delay should be.  The bus
>> speed is known. 
>>     
>
> Wrong again. ISA bus speed is neither defined precisely, nor visible in a
> system portable fashion.
>   

You say, "system portable," but I think you mean, "automatically
determined."  We don't have to define this value automatically, if
that's so hard to do.  We can use a tunable kernel-parameter.

> I'm so glad you have nothing better to do than troll

I'm not trolling.  You know this is true because many people perceive
this to be a problem.  I'm working on fixing it.  Not all Linux problems
are solvable by diving into code, and there is anecdotal evidence to
believe this one has big performance considerations.  I don't understand
why you are opposed to even talking about it.


> if you
> actually wrote code I'd be worried it might get into something people
> used.

Speaking of writing code: I remember working on a bluetooth Oops. 
Lacking the hardware, I went to you for advice on how to get it before
someone for testing.  You never replied.

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-16 19:15                                                                               ` David Newall
@ 2008-01-16 20:08                                                                                 ` Alan Cox
  2008-01-17  6:25                                                                                   ` David Newall
  0 siblings, 1 reply; 61+ messages in thread
From: Alan Cox @ 2008-01-16 20:08 UTC (permalink / raw)
  To: David Newall
  Cc: David P. Reed, David Woodhouse, Rene Herman, Zachary Amsden,
	H. Peter Anvin, Christer Weinigel, Ondrej Zary, Bodo Eggert,
	Ingo Molnar, Paul Rolland, Pavel Machek, Thomas Gleixner,
	linux-kernel, Ingo Molnar, rol

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

And the only instruction that is synchronized to the bus in question is
an I/O instruction. 

> Wrong again.  Of course one knows how long the delay should be.  The bus
> speed is known. 

Wrong again. ISA bus speed is neither defined precisely, nor visible in a
system portable fashion.

I'm so glad you have nothing better to do than troll, if you
actually wrote code I'd be worried it might get into something people
used.

Alan

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-16 14:55                                                                             ` Alan Cox
@ 2008-01-16 19:15                                                                               ` David Newall
  2008-01-16 20:08                                                                                 ` Alan Cox
  0 siblings, 1 reply; 61+ messages in thread
From: David Newall @ 2008-01-16 19:15 UTC (permalink / raw)
  To: Alan Cox
  Cc: David P. Reed, David Woodhouse, Rene Herman, Zachary Amsden,
	H. Peter Anvin, Christer Weinigel, Ondrej Zary, Bodo Eggert,
	Ingo Molnar, Paul Rolland, Pavel Machek, Thomas Gleixner,
	linux-kernel, Ingo Molnar, rol

Alan Cox wrote:
> On Thu, 17 Jan 2008 01:06:24 +1030
> David Newall <davidn@davidnewall.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.

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-16 14:36                                                                           ` David Newall
@ 2008-01-16 14:55                                                                             ` Alan Cox
  2008-01-16 19:15                                                                               ` David Newall
  0 siblings, 1 reply; 61+ messages in thread
From: Alan Cox @ 2008-01-16 14:55 UTC (permalink / raw)
  To: David Newall
  Cc: David P. Reed, David Woodhouse, Rene Herman, Zachary Amsden,
	H. Peter Anvin, Christer Weinigel, Ondrej Zary, Bodo Eggert,
	Ingo Molnar, Paul Rolland, Pavel Machek, Thomas Gleixner,
	linux-kernel, Ingo Molnar, rol

On Thu, 17 Jan 2008 01:06:24 +1030
David Newall <davidn@davidnewall.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.

 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

> that an OUT is used because you don't know how long the delay should be
> on any specific machine.  What rubbish.

Wrong again.

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

Alan

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-14 22:22                                                                         ` David P. Reed
@ 2008-01-16 14:36                                                                           ` David Newall
  2008-01-16 14:55                                                                             ` Alan Cox
  0 siblings, 1 reply; 61+ messages in thread
From: David Newall @ 2008-01-16 14:36 UTC (permalink / raw)
  To: David P. Reed
  Cc: David Woodhouse, Rene Herman, Zachary Amsden, H. Peter Anvin,
	Christer Weinigel, Ondrej Zary, Bodo Eggert, Ingo Molnar,
	Alan Cox, Paul Rolland, Pavel Machek, Thomas Gleixner,
	linux-kernel, Ingo Molnar, rol

David P. Reed wrote:
> I think we probably have a great shot at getting Intel, Microsoft, HP,
> et al.. to add a feature for Linux to one of the ACPI table
> specifications that define an "unused port for delay purposes" field
> in the ACPI 4.0 spec, and retrofit it into PC/104 machine BIOSes.  At
> least Microsoft doesn't have a patent on using port 80 for delay
> purposes. :-) 

This use of port 80 (or insert some other random number) is a croc of
hackery of the most inexperienced kind.  The task to be performed is to
delay for some period, and I think it's a mix of bloody mindedness and
fear of unfamiliar code and specification that explains why a delay is
not being coded.  Lest we forget, someone who should know better said
that an OUT is used because you don't know how long the delay should be
on any specific machine.  What rubbish.

For what it's worth, I would oppose any attempt to ammend ACPI
specifications in the way described above.  It's bad enough to have that
embarrassing and unseemly hack in Linux.  It would be so much worse to
enshrine the practice as industry standard practice.

I won't even mention the many instances of these delays where no delay
is what properly is needed.  Performance?  Who cares about performance?

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-14 21:57                                                                       ` David Woodhouse
@ 2008-01-14 22:22                                                                         ` David P. Reed
  2008-01-16 14:36                                                                           ` David Newall
  0 siblings, 1 reply; 61+ messages in thread
From: David P. Reed @ 2008-01-14 22:22 UTC (permalink / raw)
  To: David Woodhouse
  Cc: Rene Herman, Zachary Amsden, H. Peter Anvin, Christer Weinigel,
	Ondrej Zary, Bodo Eggert, Ingo Molnar, Alan Cox, Paul Rolland,
	Pavel Machek, Thomas Gleixner, linux-kernel, Ingo Molnar, rol

David Woodhouse wrote:
> On Fri, 2008-01-11 at 09:35 -0500, David P. Reed wrote:
>   
>>   Using any "unused port" for a delay means that the machine check
>> feature is wasted and utterly unusable.
>>     
>
> Not entirely unusable. You can recover silently from the machine check
> if it was one of the known accesses to the 'unused port'. It certainly
> achieves a delay :)
>   
I'm sure that's what the driver writers had in mind.  ;-)

And I think we probably have a great shot at getting Intel, Microsoft, 
HP, et al.. to add a feature for Linux to one of the ACPI table 
specifications that define an "unused port for delay purposes" field in 
the ACPI 4.0 spec, and retrofit it into PC/104 machine BIOSes.  At least 
Microsoft doesn't have a patent on using port 80 for delay purposes. :-)





^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-11 14:35                                                                     ` David P. Reed
  2008-01-11 14:37                                                                       ` Alan Cox
  2008-01-11 14:49                                                                       ` Rene Herman
@ 2008-01-14 21:57                                                                       ` David Woodhouse
  2008-01-14 22:22                                                                         ` David P. Reed
  2 siblings, 1 reply; 61+ messages in thread
From: David Woodhouse @ 2008-01-14 21:57 UTC (permalink / raw)
  To: David P. Reed
  Cc: Rene Herman, Zachary Amsden, H. Peter Anvin, Christer Weinigel,
	Ondrej Zary, Bodo Eggert, Ingo Molnar, Alan Cox, Paul Rolland,
	Pavel Machek, Thomas Gleixner, linux-kernel, Ingo Molnar, rol


On Fri, 2008-01-11 at 09:35 -0500, David P. Reed wrote:
>   Using any "unused port" for a delay means that the machine check
> feature is wasted and utterly unusable.

Not entirely unusable. You can recover silently from the machine check
if it was one of the known accesses to the 'unused port'. It certainly
achieves a delay :)

On ppc32 we recover from the machine check if it was any inb/outb --
mostly to work around crappy drivers developed on i386, I believe.

-- 
dwmw2


^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-11 15:07                                                                         ` David P. Reed
@ 2008-01-11 17:54                                                                           ` H. Peter Anvin
  0 siblings, 0 replies; 61+ messages in thread
From: H. Peter Anvin @ 2008-01-11 17:54 UTC (permalink / raw)
  To: David P. Reed
  Cc: Alan Cox, Rene Herman, Zachary Amsden, Christer Weinigel,
	Ondrej Zary, Bodo Eggert, Ingo Molnar, Paul Rolland,
	Pavel Machek, Thomas Gleixner, linux-kernel, Ingo Molnar, rol

David P. Reed wrote:
> Alan Cox wrote:
>>> bus abort on the LPC bus".   More problematic is that I would think 
>>> some people might want to turn on the AMD feature that generates 
>>> machine checks if a bus timeout happens.   The whole point of machine 
>>> checks is     
>>
>> An ISA/LPC bus timeout is fulfilled by the bridge so doesn't cause an 
>> MCE.

> Good possibility, but the documentation on HyperTransport suggests 
> otherwise, even for LPC bridges in this particular modern world of 
> AMD64. I might do the experiment someday to see if my LPC bridge is 
> implemented in a way that does or doesn't support enabling MCE's. Could 
> be different between Intel and AMD - I haven't had reason to pore over 
> the Intel chipset specs, since my poking into all this stuff has been 
> driven by my personal machine's issues, and it's not got any Intel 
> compatible parts.

If you have a subtractive decoding bridge you will have completion on HT.

	-hpa

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-11 14:37                                                                       ` Alan Cox
@ 2008-01-11 15:07                                                                         ` David P. Reed
  2008-01-11 17:54                                                                           ` H. Peter Anvin
  0 siblings, 1 reply; 61+ messages in thread
From: David P. Reed @ 2008-01-11 15:07 UTC (permalink / raw)
  To: Alan Cox
  Cc: Rene Herman, Zachary Amsden, H. Peter Anvin, Christer Weinigel,
	Ondrej Zary, Bodo Eggert, Ingo Molnar, Paul Rolland,
	Pavel Machek, Thomas Gleixner, linux-kernel, Ingo Molnar, rol

Alan Cox wrote:
>> bus abort on the LPC bus".   More problematic is that I would think some 
>> people might want to turn on the AMD feature that generates machine 
>> checks if a bus timeout happens.   The whole point of machine checks is 
>>     
>
> An ISA/LPC bus timeout is fulfilled by the bridge so doesn't cause an MCE.
>
>
>   
Good possibility, but the documentation on HyperTransport suggests 
otherwise, even for LPC bridges in this particular modern world of 
AMD64. I might do the experiment someday to see if my LPC bridge is 
implemented in a way that does or doesn't support enabling MCE's. Could 
be different between Intel and AMD - I haven't had reason to pore over 
the Intel chipset specs, since my poking into all this stuff has been 
driven by my personal machine's issues, and it's not got any Intel 
compatible parts.

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-11 14:35                                                                     ` David P. Reed
  2008-01-11 14:37                                                                       ` Alan Cox
@ 2008-01-11 14:49                                                                       ` Rene Herman
  2008-01-14 21:57                                                                       ` David Woodhouse
  2 siblings, 0 replies; 61+ messages in thread
From: Rene Herman @ 2008-01-11 14:49 UTC (permalink / raw)
  To: David P. Reed
  Cc: Zachary Amsden, H. Peter Anvin, Christer Weinigel, Ondrej Zary,
	Bodo Eggert, Ingo Molnar, Alan Cox, Paul Rolland, Pavel Machek,
	Thomas Gleixner, linux-kernel, Ingo Molnar, rol

On 11-01-08 15:35, David P. Reed wrote:

> Rene Herman wrote:
>> On 11-01-08 02:36, Zachary Amsden wrote:
>>
>>> FWIW, I fixed the problem locally by recompiling, changing port 80 to 
>>> port 84 in io.h; works great, and doesn't conflict with any occupied 
>>> ports.
>>
>> Might not give you a "proper" delay though. 0xed should be a better 
>> choice...
>>
> I don't think there is any magic here.

Golly, you don't think so? Just commenting on his local hack. Port 0x84 is 
inside the (reserved) DMA page register range and stands a better chance of 
not being echoed onto ISA by various chipsets than 0xed does due to that.

Yes -- on a sane machine it's all useless anyway and with all sane machines 
this discussion would've ended quite some time ago already. It's the insane, 
obsolete legacy junk that's the problem.

Rene.

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-11 14:35                                                                     ` David P. Reed
@ 2008-01-11 14:37                                                                       ` Alan Cox
  2008-01-11 15:07                                                                         ` David P. Reed
  2008-01-11 14:49                                                                       ` Rene Herman
  2008-01-14 21:57                                                                       ` David Woodhouse
  2 siblings, 1 reply; 61+ messages in thread
From: Alan Cox @ 2008-01-11 14:37 UTC (permalink / raw)
  To: David P. Reed
  Cc: Rene Herman, Zachary Amsden, H. Peter Anvin, Christer Weinigel,
	Ondrej Zary, Bodo Eggert, Ingo Molnar, Paul Rolland,
	Pavel Machek, Thomas Gleixner, linux-kernel, Ingo Molnar, rol

> bus abort on the LPC bus".   More problematic is that I would think some 
> people might want to turn on the AMD feature that generates machine 
> checks if a bus timeout happens.   The whole point of machine checks is 

An ISA/LPC bus timeout is fulfilled by the bridge so doesn't cause an MCE.

Alan

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-11  3:05                                                                   ` Rene Herman
@ 2008-01-11 14:35                                                                     ` David P. Reed
  2008-01-11 14:37                                                                       ` Alan Cox
                                                                                         ` (2 more replies)
  0 siblings, 3 replies; 61+ messages in thread
From: David P. Reed @ 2008-01-11 14:35 UTC (permalink / raw)
  To: Rene Herman
  Cc: Zachary Amsden, H. Peter Anvin, Christer Weinigel, Ondrej Zary,
	Bodo Eggert, Ingo Molnar, Alan Cox, Paul Rolland, Pavel Machek,
	Thomas Gleixner, linux-kernel, Ingo Molnar, rol



Rene Herman wrote:
> On 11-01-08 02:36, Zachary Amsden wrote:
>
>> FWIW, I fixed the problem locally by recompiling, changing port 80 to 
>> port 84 in io.h; works great, and doesn't conflict with any occupied 
>> ports.
>
> Might not give you a "proper" delay though. 0xed should be a better 
> choice...
>
I don't think there is any magic here.  I modified the patch to do *no 
delay at all* in the io_delay "quirk" and have been running reliably for 
weeks including the very heavy I/O load that comes from using software 
RAID on this nice laptop that has two separate SATA drives!  This 
particular laptop has no problematic devices - the only problem is 
actually in the CMOS_READ and CMOS_WRITE macros that *use* the _p 
operations in a way that is unnecessary on this machine.  (in fact, it 
would be hard to add a problematic device - there's no PCMCIA slot 
either, and so every option is USB or Firewire).

Using 0xED happens to work, but it's not guaranteed to work either.  
There is not a "standard" for an "unused port that is mapped to cause a 
bus abort on the LPC bus".   More problematic is that I would think some 
people might want to turn on the AMD feature that generates machine 
checks if a bus timeout happens.   The whole point of machine checks is 
to allow the machine to be more reliable.   Using any "unused port" for 
a delay means that the machine check feature is wasted and utterly unusable.



^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-11  1:36                                                                 ` Zachary Amsden
@ 2008-01-11  3:05                                                                   ` Rene Herman
  2008-01-11 14:35                                                                     ` David P. Reed
  0 siblings, 1 reply; 61+ messages in thread
From: Rene Herman @ 2008-01-11  3:05 UTC (permalink / raw)
  To: Zachary Amsden
  Cc: David P. Reed, H. Peter Anvin, Christer Weinigel, Ondrej Zary,
	Bodo Eggert, Ingo Molnar, Alan Cox, Paul Rolland, Pavel Machek,
	Thomas Gleixner, linux-kernel, Ingo Molnar, rol

On 11-01-08 02:36, Zachary Amsden wrote:

> FWIW, I fixed the problem locally by recompiling, changing port 80 to 
> port 84 in io.h; works great, and doesn't conflict with any occupied 
> ports.

Might not give you a "proper" delay though. 0xed should be a better choice...

Rene.

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-09 22:22                                                               ` David P. Reed
@ 2008-01-11  1:36                                                                 ` Zachary Amsden
  2008-01-11  3:05                                                                   ` Rene Herman
  0 siblings, 1 reply; 61+ messages in thread
From: Zachary Amsden @ 2008-01-11  1:36 UTC (permalink / raw)
  To: David P. Reed
  Cc: H. Peter Anvin, Christer Weinigel, Ondrej Zary, Rene Herman,
	Bodo Eggert, Ingo Molnar, Alan Cox, Paul Rolland, Pavel Machek,
	Thomas Gleixner, linux-kernel, Ingo Molnar, rol

On Wed, 2008-01-09 at 17:22 -0500, David P. Reed wrote:
> Zachary Amsden wrote:
> >
> > According to Phoenix Technologies book "System BIOS for IBM PCs,
> > Compatibles and EISA Computers, 2nd Edition", the I/O port list gives
> >
> > port 0080h   R/W  Extra page register (temporary storage)
> >
> > Despite looking, I've never seen it documented anywhere else, but I
> > believe it works on just about every PC platform.  Except, apparently,
> > my laptop.
> >
> >
> >   
> The port 80 problem was discovered by me, after months of "bisecting" 
> the running code around a problem with hanging when using hwclock in 
> 64-bit mode when ACPI is on.  So it kills my laptop, too, and many 
> currentlaptop motherboards designed by Quanta for HP and Compaq (dv6000, 
> dv9000, tx1000, apparently)

Thanks very much for that - I was debugging this for a while too, and
eventually just shut off hwclock.

> Your laptop isn't an aberration.  It's part of the new generation of 
> evolved machines that take advantage of the capabilities of ACPI and 
> SMBIOS and DMI standards that are becoming core parts of the market.

I beg to differ.  I managed to turn the thing into a brick by upgrading
the BIOS (with the correct image, no less) in an attempt to fix it.  I
just got it back from repair.  I'm not sure that is positive
evolutionary development, but it certainly does make my laptop an
aberration :)

FWIW, I fixed the problem locally by recompiling, changing port 80 to
port 84 in io.h; works great, and doesn't conflict with any occupied
ports.

Zach


^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-09 21:53                                                             ` Zachary Amsden
@ 2008-01-09 22:22                                                               ` David P. Reed
  2008-01-11  1:36                                                                 ` Zachary Amsden
  0 siblings, 1 reply; 61+ messages in thread
From: David P. Reed @ 2008-01-09 22:22 UTC (permalink / raw)
  To: Zachary Amsden
  Cc: H. Peter Anvin, Avi Kivity, Christer Weinigel, Ondrej Zary,
	Rene Herman, Bodo Eggert, Ingo Molnar, Alan Cox, Paul Rolland,
	Pavel Machek, Thomas Gleixner, linux-kernel, Ingo Molnar, rol

Zachary Amsden wrote:
>
> According to Phoenix Technologies book "System BIOS for IBM PCs,
> Compatibles and EISA Computers, 2nd Edition", the I/O port list gives
>
> port 0080h   R/W  Extra page register (temporary storage)
>
> Despite looking, I've never seen it documented anywhere else, but I
> believe it works on just about every PC platform.  Except, apparently,
> my laptop.
>
>
>   
The port 80 problem was discovered by me, after months of "bisecting" 
the running code around a problem with hanging when using hwclock in 
64-bit mode when ACPI is on.  So it kills my laptop, too, and many 
currentlaptop motherboards designed by Quanta for HP and Compaq (dv6000, 
dv9000, tx1000, apparently)

In the last couple of weeks, I was able with luck to discover that the 
problem is the ENE KB3920 chip, which is the "big brother" of the KB3700 
chip included in the OLPC XO "$100 laptop" made also by Quanta.  I 
verified this by taking my laptop apart - a fun and risky experience.  
Didn't break any connectors, but I don't recommend it for those who are 
not experienced disassembling laptops and cellphones, etc.  The KB3920 
contains an EC, an SMBus, a KBC, some watchdog timers, and a variety of 
other functions that keep the laptop going, coordinating the 
relationships among various peripherals.  The firmware is part standard 
from ENE, part OEM-specific, in this case coded by Quanta or a BIOS 
subcontractor.

You can read the specsheet for the KB3700 online at laptop.org, since 
the specs of the laptop are "open".  The 3920's spec is confidential.  
And the firmware is confidential as well for both the 3700 and 3920.  
Clues as to what it does can be gleaned by reading the disassembler 
output of the DSDT code in the particular laptops - though the SMM BIOS 
probably also talks to it.

Modern machines have many subsystems, and the ACPI and SMBIOS coordinate 
to run them; blade servers also have drawer controllers and backplane 
management buses.  The part that runs Linux is only part of the machine.

Your laptop isn't an aberration.  It's part of the new generation of 
evolved machines that take advantage of the capabilities of ACPI and 
SMBIOS and DMI standards that are becoming core parts of the market.



^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-09 20:26                                                                   ` Christer Weinigel
@ 2008-01-09 21:59                                                                     ` H. Peter Anvin
  0 siblings, 0 replies; 61+ messages in thread
From: H. Peter Anvin @ 2008-01-09 21:59 UTC (permalink / raw)
  To: Christer Weinigel
  Cc: Zachary Amsden, Rene Herman, David P. Reed, Avi Kivity,
	Ondrej Zary, Bodo Eggert, Ingo Molnar, Alan Cox, Paul Rolland,
	Pavel Machek, Thomas Gleixner, linux-kernel, Ingo Molnar, rol

Christer Weinigel wrote:
> On Wed, 09 Jan 2008 10:18:11 -0800
> "H. Peter Anvin" <hpa@zytor.com> wrote:
> 
>> Zachary Amsden wrote:
>>> I'm speaking specifically in terms of 64-bit platforms here.
>>> Shouldn't we unconditionally drop outb_p doing extra port I/O on
>>> 64-bit architectures?  Especially considering they don't even have
>>> an ISA bus where the decode timing could even matter?
>>>
>> Why should the bitsize of the CPU matter for this?  It seems one of
>> the less meaningful keys for this.
> 
> Well, anything that runs x86_64 should be a fairly modern system.
>  

Yes, but you hardly want a situation where the machine works booting a 
32-bit kernel and not a 64-bit kernel, or vice versa.

Furthermore, it's not so much about "modern" versus "old", it is about 
picking a certain set of bugs.

	-hpa

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-09  5:19                                                           ` H. Peter Anvin
@ 2008-01-09 21:53                                                             ` Zachary Amsden
  2008-01-09 22:22                                                               ` David P. Reed
  0 siblings, 1 reply; 61+ messages in thread
From: Zachary Amsden @ 2008-01-09 21:53 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: David P. Reed, Avi Kivity, Christer Weinigel, Ondrej Zary,
	Rene Herman, Bodo Eggert, Ingo Molnar, Alan Cox, Paul Rolland,
	Pavel Machek, Thomas Gleixner, linux-kernel, Ingo Molnar, rol

On Tue, 2008-01-08 at 21:19 -0800, H. Peter Anvin wrote:
> Zachary Amsden wrote:
> > 
> > BTW, it isn't ever safe to pass port 0x80 through to hardware from a
> > virtual machine; some OSes use port 0x80 as a hardware available scratch
> > register (I believe Darwin/x86 did/does this during boot).
> 
> That's funny, because there is definitely no guarantee that you get back 
> what you read (well, perhaps there is on Apple.)

According to Phoenix Technologies book "System BIOS for IBM PCs,
Compatibles and EISA Computers, 2nd Edition", the I/O port list gives

port 0080h   R/W  Extra page register (temporary storage)

Despite looking, I've never seen it documented anywhere else, but I
believe it works on just about every PC platform.  Except, apparently,
my laptop.

Zach


^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-09 18:18                                                                 ` H. Peter Anvin
@ 2008-01-09 20:26                                                                   ` Christer Weinigel
  2008-01-09 21:59                                                                     ` H. Peter Anvin
  0 siblings, 1 reply; 61+ messages in thread
From: Christer Weinigel @ 2008-01-09 20:26 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Zachary Amsden, Rene Herman, David P. Reed, Avi Kivity,
	Ondrej Zary, Bodo Eggert, Ingo Molnar, Alan Cox, Paul Rolland,
	Pavel Machek, Thomas Gleixner, linux-kernel, Ingo Molnar, rol

On Wed, 09 Jan 2008 10:18:11 -0800
"H. Peter Anvin" <hpa@zytor.com> wrote:

> Zachary Amsden wrote:
> > 
> > I'm speaking specifically in terms of 64-bit platforms here.
> > Shouldn't we unconditionally drop outb_p doing extra port I/O on
> > 64-bit architectures?  Especially considering they don't even have
> > an ISA bus where the decode timing could even matter?
> > 
> 
> Why should the bitsize of the CPU matter for this?  It seems one of
> the less meaningful keys for this.

Well, anything that runs x86_64 should be a fairly modern system.
 
> Second, as I have mentioned, I don't believe this is really the case, 
> especially not for the PIT, which is still present -- the PIT 
> *semantics* has explicit timing constraints.
> 
> Third, you still have ISA devices, they're just called LPC or PC104 
> devices these days.

Or PCMCIA.  I'm still a happy user of a Zyxel ZyAIR 100B, it's one of
the most stable cards Wifi I've got running under Linux.   :-)

  /Christer

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-09 18:22                                                                 ` Adrian Bunk
@ 2008-01-09 18:27                                                                   ` H. Peter Anvin
  0 siblings, 0 replies; 61+ messages in thread
From: H. Peter Anvin @ 2008-01-09 18:27 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: Zachary Amsden, Rene Herman, Christer Weinigel, David P. Reed,
	Avi Kivity, Ondrej Zary, Bodo Eggert, Ingo Molnar, Alan Cox,
	Paul Rolland, Pavel Machek, Thomas Gleixner, linux-kernel,
	Ingo Molnar, rol

Adrian Bunk wrote:
> 
> I don't think the latter statement was true - AFAIR there are Alphas 
> with ISA slots.
> 

See subject line.

	-hpa

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-09 18:17                                                               ` Zachary Amsden
  2008-01-09 18:18                                                                 ` H. Peter Anvin
@ 2008-01-09 18:22                                                                 ` Adrian Bunk
  2008-01-09 18:27                                                                   ` H. Peter Anvin
  1 sibling, 1 reply; 61+ messages in thread
From: Adrian Bunk @ 2008-01-09 18:22 UTC (permalink / raw)
  To: Zachary Amsden
  Cc: Rene Herman, Christer Weinigel, David P. Reed, Avi Kivity,
	Ondrej Zary, H. Peter Anvin, Bodo Eggert, Ingo Molnar, Alan Cox,
	Paul Rolland, Pavel Machek, Thomas Gleixner, linux-kernel,
	Ingo Molnar, rol

On Wed, Jan 09, 2008 at 10:17:24AM -0800, Zachary Amsden wrote:
> On Wed, 2008-01-09 at 16:27 +0100, Rene Herman wrote:
> > On 09-01-08 06:30, Christer Weinigel wrote:
> > I'd not expect very time crtical. The current outb_p use gives a delay 
> > somewhere between .5 and 2 microseconds as per earlier survey meaning a 
> > udelay(1) or 2 would be enough -- again, at the point that udelay() is sensible.
> > 
> > New machines don't use the legacy PIC anymore anyway.
> > 
> > > The floppy controller code uses outb_p.  Even though there might be
> > > floppy controllers on modern systems, I'd rather leave the floppy code
> > > alone since it's supposed to be very fragile.  If you still use
> > > floppies you deserve what you get.
> > 
> > Floppies forever. In practice, leaving it alone isn't going to matter, but 
> > in that same practice changing it to udelay() probably doesn't either. The 
> > ones to leave alone are the ones that are clumsy/impossible to test and the 
> > ones such as in NIC drivers that were specifically tuned.
> 
> I'm speaking specifically in terms of 64-bit platforms here.  Shouldn't
> we unconditionally drop outb_p doing extra port I/O on 64-bit
> architectures?  Especially considering they don't even have an ISA bus
> where the decode timing could even matter?
>...

I don't think the latter statement was true - AFAIR there are Alphas 
with ISA slots.

> Agree.
> 
> Zach

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-09 18:17                                                               ` Zachary Amsden
@ 2008-01-09 18:18                                                                 ` H. Peter Anvin
  2008-01-09 20:26                                                                   ` Christer Weinigel
  2008-01-09 18:22                                                                 ` Adrian Bunk
  1 sibling, 1 reply; 61+ messages in thread
From: H. Peter Anvin @ 2008-01-09 18:18 UTC (permalink / raw)
  To: Zachary Amsden
  Cc: Rene Herman, Christer Weinigel, David P. Reed, Avi Kivity,
	Ondrej Zary, Bodo Eggert, Ingo Molnar, Alan Cox, Paul Rolland,
	Pavel Machek, Thomas Gleixner, linux-kernel, Ingo Molnar, rol

Zachary Amsden wrote:
> 
> I'm speaking specifically in terms of 64-bit platforms here.  Shouldn't
> we unconditionally drop outb_p doing extra port I/O on 64-bit
> architectures?  Especially considering they don't even have an ISA bus
> where the decode timing could even matter?
> 

Why should the bitsize of the CPU matter for this?  It seems one of the 
less meaningful keys for this.

Second, as I have mentioned, I don't believe this is really the case, 
especially not for the PIT, which is still present -- the PIT 
*semantics* has explicit timing constraints.

Third, you still have ISA devices, they're just called LPC or PC104 
devices these days.

	-hpa

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-09 15:27                                                             ` Rene Herman
@ 2008-01-09 18:17                                                               ` Zachary Amsden
  2008-01-09 18:18                                                                 ` H. Peter Anvin
  2008-01-09 18:22                                                                 ` Adrian Bunk
  0 siblings, 2 replies; 61+ messages in thread
From: Zachary Amsden @ 2008-01-09 18:17 UTC (permalink / raw)
  To: Rene Herman
  Cc: Christer Weinigel, David P. Reed, Avi Kivity, Ondrej Zary,
	H. Peter Anvin, Bodo Eggert, Ingo Molnar, Alan Cox, Paul Rolland,
	Pavel Machek, Thomas Gleixner, linux-kernel, Ingo Molnar, rol

On Wed, 2008-01-09 at 16:27 +0100, Rene Herman wrote:
> On 09-01-08 06:30, Christer Weinigel wrote:
> I'd not expect very time crtical. The current outb_p use gives a delay 
> somewhere between .5 and 2 microseconds as per earlier survey meaning a 
> udelay(1) or 2 would be enough -- again, at the point that udelay() is sensible.
> 
> New machines don't use the legacy PIC anymore anyway.
> 
> > The floppy controller code uses outb_p.  Even though there might be
> > floppy controllers on modern systems, I'd rather leave the floppy code
> > alone since it's supposed to be very fragile.  If you still use
> > floppies you deserve what you get.
> 
> Floppies forever. In practice, leaving it alone isn't going to matter, but 
> in that same practice changing it to udelay() probably doesn't either. The 
> ones to leave alone are the ones that are clumsy/impossible to test and the 
> ones such as in NIC drivers that were specifically tuned.

I'm speaking specifically in terms of 64-bit platforms here.  Shouldn't
we unconditionally drop outb_p doing extra port I/O on 64-bit
architectures?  Especially considering they don't even have an ISA bus
where the decode timing could even matter?

> If simple outb_p() deprecation is considered enough instead, no need to 
> touch anything in drivers/, only changes to "outb(); udelay()" outside drivers/.
> 
> I'd let Alan decide here.

Agree.

Zach


^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-09  5:30                                                           ` Christer Weinigel
  2008-01-09 14:42                                                             ` David P. Reed
@ 2008-01-09 15:27                                                             ` Rene Herman
  2008-01-09 18:17                                                               ` Zachary Amsden
  1 sibling, 1 reply; 61+ messages in thread
From: Rene Herman @ 2008-01-09 15:27 UTC (permalink / raw)
  To: Christer Weinigel
  Cc: Zachary Amsden, David P. Reed, Avi Kivity, Ondrej Zary,
	H. Peter Anvin, Bodo Eggert, Ingo Molnar, Alan Cox, Paul Rolland,
	Pavel Machek, Thomas Gleixner, linux-kernel, Ingo Molnar, rol

On 09-01-08 06:30, Christer Weinigel wrote:

> On Tue, 08 Jan 2008 18:52:42 -0800
> Zachary Amsden <zach@vmware.com> wrote:

>> What is the outcome of this thread?  Are we going to use timing based
>> port delays, or can we finally drop these things entirely on 64-bit
>> architectures?
>>
>> I a have a doubly vested interest in this, both as the owner of an
>> affected HP dv9210us laptop and as a maintainer of paravirt code - and
>> would like 64-bit Linux code to stop using I/O to port 0x80 in both
>> cases (as I suspect would every other person involved with
>> virtualization).
>>
>> I've tried to follow this thread, but with all the jabs, 1-ups, and
>> obscure legacy hardware pageantry going on, it isn't clear what we're
>> really doing.
> 
> I belive Alan Cox is doing a review of some drivers, to see if they
> actually need the I/O port delay.  A lot of drivers probably use outb_p
> just because it was copy-pasted from some other driver and it can be
> removed.  Alan's review has also brought to light a lack of locking in
> some drivers, so I think Alan has been adding proper locking to some of
> the watchdog drivers.

Yes, Alan should be considered to be in the driver seat here (and current 
x86.git changes should be tossed).

> Most old ISA only device drivers can keep using OUT 80h.  They are not
> used on modern machines and it's better to keep them unchanged to avoid
> unneccesary incompatibilities.
> 
> As far as I know, the 8253 PIT timer code needs outb_p on some older
> platform, and this is one of the most troublesome since the same PIT
> controller (or a register compatible one) has been used since the
> original IBM PC, and it is frequently executed code.  Ingo Molnar has
> done an alternate implementation of the PIT clock source which uses
> udelay instead of OUT 80h to delay accesses to the ports. The kernel
> could make a choice of which variant to use based on the DMI year, if
> compiling for x86_64, or something similar.  Maybe have a command line
> option too.

Just udelay() should be fine after "fixing" udelay() to be somewhat usefully 
defined pre-calibration.

> The keyboard controller on some platform needs the delay, and the same
> driver is used on both ancient and modern systems, I think it can be
> changed to udelay since it's not so time critical code.
> 
> The 8259 interrupt controller on some platform needs the delay, I think
> it can be changed to udelay since it's only some setup code that uses
> outb_p.  I guess there are time critical accesses to the interrupt
> controller from assembly code somewhere to acknowledge interrupts, and
> that code needs a review.

I'd not expect very time crtical. The current outb_p use gives a delay 
somewhere between .5 and 2 microseconds as per earlier survey meaning a 
udelay(1) or 2 would be enough -- again, at the point that udelay() is sensible.

New machines don't use the legacy PIC anymore anyway.

> The floppy controller code uses outb_p.  Even though there might be
> floppy controllers on modern systems, I'd rather leave the floppy code
> alone since it's supposed to be very fragile.  If you still use
> floppies you deserve what you get.

Floppies forever. In practice, leaving it alone isn't going to matter, but 
in that same practice changing it to udelay() probably doesn't either. The 
ones to leave alone are the ones that are clumsy/impossible to test and the 
ones such as in NIC drivers that were specifically tuned.

> Some specific drivers, such as drivers for 8390 or 8390 clone based
> network cards are also a bit troublesome, they do need outb_p (and
> the delay for the original 8390 chip is specified in bus cycles), and
> there can be a big performance loss if pessimistic udelays are used for
> the delay.  There are still a bunch of PCMCIA cards based on that chip
> which means that those cards can be used with modern machines.  There
> are also PCI and memory mapped variants of the 8390, some of them new
> designs which are only register compatible, some other designs are
> using a real 8390 with a FPGA used as glue logic. I think Alan
> suggested compiling two versions of that driver, one with OUT 80h, and
> one with udelay.  Old machines can choose the old driver, and new
> machines can use the new one.  Other drivers can probably do the same
> thing, or if not time critical, always use a pessimistic udelay.

Not sure what the final suggestion for those was either....

> As for the implementation, I like the suggestion to split outb_b into
> two calls, one to outb and one to isa_slow_down_io.  It makes it very
> obvious that it is really two function calls, and that it needs
> locking.  For those uses that are not ISA port accesses,
> isa_slow_down_io should be changed to an appropriate udelay instead.

... or simply deleted. The current outb_p is "outb; slow_down_io" as a macro 
so that with this you also get no binary changes, making it rather easy to 
prove that things do not change timing in cases where you keep the delay.

(they're not so much function calls though -- they're inlined).

> The goal is anyway that a modern machine should not do OUT 80h, and old
> machines keep doing it since it has been working well for some 15-odd
> years, both in DOS device drivers and on Linux.  Using an alternate
> port may be a workaround, but it's probaby not a good idea since
> alternate ports have received less testing and there's bound to be some
> platform out there that has problems with any alternate port we
> might choose.

Based on specific DMI strings this can be limited to tested machines (as in 
current x86.git) but yes, that's not particularly pleasing.

> Allowing an alternate port will also add code bloat (OUT 80h, AL becomes
> MOV DX, alternate_port; OUT DX, AL) for a dubious gain.


... destroying DX while it's at it meaning this might (will) also need DX 
reloads. Not an argument versus a function call, but an argument versus the 
current and proposed manual "outb; slow_down_io" split.

> Did I miss anyting?

Not so much it seems. Only that the only reason for the outb_p slit is an 
API one. Molnar wants the API cleaned up to make sure no new users of outb_p 
creep in, and being explkicit abhout what it that you're doing is going to 
take care of that.

If simple outb_p() deprecation is considered enough instead, no need to 
touch anything in drivers/, only changes to "outb(); udelay()" outside drivers/.

I'd let Alan decide here.

Thanks for the roundup.

Rene.

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-09  5:30                                                           ` Christer Weinigel
@ 2008-01-09 14:42                                                             ` David P. Reed
  2008-01-09 15:27                                                             ` Rene Herman
  1 sibling, 0 replies; 61+ messages in thread
From: David P. Reed @ 2008-01-09 14:42 UTC (permalink / raw)
  To: Christer Weinigel
  Cc: Zachary Amsden, Avi Kivity, Ondrej Zary, H. Peter Anvin,
	Rene Herman, Bodo Eggert, Ingo Molnar, Alan Cox, Paul Rolland,
	Pavel Machek, Thomas Gleixner, linux-kernel, Ingo Molnar, rol

Christer Weinigel wrote:
>
> Did I miss anyting?
>
>   
Nothing that seems *crucial* going forward for Linux.  The fate of
"legacy machines" is really important to get right.

I have a small suggestion in mind that might be helpful in the future:
the  "motherboard resources" discovered as PNP0C02 devices in their _CRS
settings in ACPI during ACPI PnP startup should be reserved (or
checked), and any drivers that still use port 80 implicitly should
reserve that port.

This may be too late in the boot process to make a decision not to use 
port 80, and it
doesn't help decide a strategy to use an alternate port (0xED happens to
"work" on the dv9000 machines in the sense that it generates a bus
timeout on LPC, but there is no guarantee that 0xED is free on any 
particular motherboard, and "unusedness" is not declared in any 
BIOS/ACPI tables) or to use a udelay-based iodelay (but there is nothing 
in the BIOS tables that suggest the right delays for various I/O ports 
if any modern parts need them...which I question, but can't prove a 
negative in general).

However, doing the reservations on such resources could generate a 
warning that would help diagnose new current and future
designs including devices like the ENE KB3920 that have a port that is
defaulted to port 80 and routed to the EC for functions that the 
firmware and ACPI can agree to do.  Or any other ports used in new ways 
and properly notified to the OS via the now-standard Wintel BIOS functions.

I don't know if /proc/ioports is being maintained, but the fact that it
doesn't contain all of those PNP0C02 resources known on my machine seems 
to be a bug - which I am happy to code a patch or two for as a 
contribution back to Linux, if it isn't on the way out as the /sys 
hierarchy does a better job.
/sys/bus/pnp/... does get built properly and has port 80 described
properly - not as a DMA port, but as a port in use by device 05:00, 
which is the motherboard resource catchall.  Thus the patch would be small.



^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-09  2:52                                                         ` Zachary Amsden
  2008-01-09  5:19                                                           ` H. Peter Anvin
@ 2008-01-09  5:30                                                           ` Christer Weinigel
  2008-01-09 14:42                                                             ` David P. Reed
  2008-01-09 15:27                                                             ` Rene Herman
  1 sibling, 2 replies; 61+ messages in thread
From: Christer Weinigel @ 2008-01-09  5:30 UTC (permalink / raw)
  To: Zachary Amsden
  Cc: David P. Reed, Avi Kivity, Ondrej Zary, H. Peter Anvin,
	Rene Herman, Bodo Eggert, Ingo Molnar, Alan Cox, Paul Rolland,
	Pavel Machek, Thomas Gleixner, linux-kernel, Ingo Molnar, rol

On Tue, 08 Jan 2008 18:52:42 -0800
Zachary Amsden <zach@vmware.com> wrote:

> On Tue, 2008-01-08 at 14:15 -0500, David P. Reed wrote:
> > Alan Cox wrote:
> > > The natsemi docs here say otherwise. I trust them not you.
> > >   
> > As well you should. I am honestly curious (for my own satisfaction)
> > as to what the natsemi docs say the delay code should do  (can't
> > imagine they say "use io port 80 because it is unused").  I don't
> > have any 
> 
> What is the outcome of this thread?  Are we going to use timing based
> port delays, or can we finally drop these things entirely on 64-bit
> architectures?
> 
> I a have a doubly vested interest in this, both as the owner of an
> affected HP dv9210us laptop and as a maintainer of paravirt code - and
> would like 64-bit Linux code to stop using I/O to port 0x80 in both
> cases (as I suspect would every other person involved with
> virtualization).
> 
> I've tried to follow this thread, but with all the jabs, 1-ups, and
> obscure legacy hardware pageantry going on, it isn't clear what we're
> really doing.

I belive Alan Cox is doing a review of some drivers, to see if they
actually need the I/O port delay.  A lot of drivers probably use outb_p
just because it was copy-pasted from some other driver and it can be
removed.  Alan's review has also brought to light a lack of locking in
some drivers, so I think Alan has been adding proper locking to some of
the watchdog drivers.

Most old ISA only device drivers can keep using OUT 80h.  They are not
used on modern machines and it's better to keep them unchanged to avoid
unneccesary incompatibilities.

As far as I know, the 8253 PIT timer code needs outb_p on some older
platform, and this is one of the most troublesome since the same PIT
controller (or a register compatible one) has been used since the
original IBM PC, and it is frequently executed code.  Ingo Molnar has
done an alternate implementation of the PIT clock source which uses
udelay instead of OUT 80h to delay accesses to the ports. The kernel
could make a choice of which variant to use based on the DMI year, if
compiling for x86_64, or something similar.  Maybe have a command line
option too.

The keyboard controller on some platform needs the delay, and the same
driver is used on both ancient and modern systems, I think it can be
changed to udelay since it's not so time critical code.

The 8259 interrupt controller on some platform needs the delay, I think
it can be changed to udelay since it's only some setup code that uses
outb_p.  I guess there are time critical accesses to the interrupt
controller from assembly code somewhere to acknowledge interrupts, and
that code needs a review.

The floppy controller code uses outb_p.  Even though there might be
floppy controllers on modern systems, I'd rather leave the floppy code
alone since it's supposed to be very fragile.  If you still use
floppies you deserve what you get.

Some specific drivers, such as drivers for 8390 or 8390 clone based
network cards are also a bit troublesome, they do need outb_p (and
the delay for the original 8390 chip is specified in bus cycles), and
there can be a big performance loss if pessimistic udelays are used for
the delay.  There are still a bunch of PCMCIA cards based on that chip
which means that those cards can be used with modern machines.  There
are also PCI and memory mapped variants of the 8390, some of them new
designs which are only register compatible, some other designs are
using a real 8390 with a FPGA used as glue logic. I think Alan
suggested compiling two versions of that driver, one with OUT 80h, and
one with udelay.  Old machines can choose the old driver, and new
machines can use the new one.  Other drivers can probably do the same
thing, or if not time critical, always use a pessimistic udelay.

As for the implementation, I like the suggestion to split outb_b into
two calls, one to outb and one to isa_slow_down_io.  It makes it very
obvious that it is really two function calls, and that it needs
locking.  For those uses that are not ISA port accesses,
isa_slow_down_io should be changed to an appropriate udelay instead.

The goal is anyway that a modern machine should not do OUT 80h, and old
machines keep doing it since it has been working well for some 15-odd
years, both in DOS device drivers and on Linux.  Using an alternate
port may be a workaround, but it's probaby not a good idea since
alternate ports have received less testing and there's bound to be some
platform out there that has problems with any alternate port we
might choose.  Allowing an alternate port will also add code bloat
(OUT 80h, AL becomes MOV DX, alternate_port; OUT DX, AL) for a
dubious gain.

Did I miss anyting?

  /Christer

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-09  2:52                                                         ` Zachary Amsden
@ 2008-01-09  5:19                                                           ` H. Peter Anvin
  2008-01-09 21:53                                                             ` Zachary Amsden
  2008-01-09  5:30                                                           ` Christer Weinigel
  1 sibling, 1 reply; 61+ messages in thread
From: H. Peter Anvin @ 2008-01-09  5:19 UTC (permalink / raw)
  To: Zachary Amsden
  Cc: David P. Reed, Avi Kivity, Christer Weinigel, Ondrej Zary,
	Rene Herman, Bodo Eggert, Ingo Molnar, Alan Cox, Paul Rolland,
	Pavel Machek, Thomas Gleixner, linux-kernel, Ingo Molnar, rol

Zachary Amsden wrote:
> 
> BTW, it isn't ever safe to pass port 0x80 through to hardware from a
> virtual machine; some OSes use port 0x80 as a hardware available scratch
> register (I believe Darwin/x86 did/does this during boot).

That's funny, because there is definitely no guarantee that you get back 
what you read (well, perhaps there is on Apple.)

	-hpa

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-08 19:15                                                       ` David P. Reed
  2008-01-08 19:23                                                         ` Alan Cox
@ 2008-01-09  2:52                                                         ` Zachary Amsden
  2008-01-09  5:19                                                           ` H. Peter Anvin
  2008-01-09  5:30                                                           ` Christer Weinigel
  1 sibling, 2 replies; 61+ messages in thread
From: Zachary Amsden @ 2008-01-09  2:52 UTC (permalink / raw)
  To: David P. Reed, Avi Kivity
  Cc: Christer Weinigel, Ondrej Zary, H. Peter Anvin, Rene Herman,
	Bodo Eggert, Ingo Molnar, Alan Cox, Paul Rolland, Pavel Machek,
	Thomas Gleixner, linux-kernel, Ingo Molnar, rol

On Tue, 2008-01-08 at 14:15 -0500, David P. Reed wrote:
> Alan Cox wrote:
> > The natsemi docs here say otherwise. I trust them not you.
> >   
> As well you should. I am honestly curious (for my own satisfaction) as 
> to what the natsemi docs say the delay code should do  (can't imagine 
> they say "use io port 80 because it is unused").  I don't have any 

What is the outcome of this thread?  Are we going to use timing based
port delays, or can we finally drop these things entirely on 64-bit
architectures?

I a have a doubly vested interest in this, both as the owner of an
affected HP dv9210us laptop and as a maintainer of paravirt code - and
would like 64-bit Linux code to stop using I/O to port 0x80 in both
cases (as I suspect would every other person involved with
virtualization).

BTW, it isn't ever safe to pass port 0x80 through to hardware from a
virtual machine; some OSes use port 0x80 as a hardware available scratch
register (I believe Darwin/x86 did/does this during boot).  This means
simultaneous execution of two virtual machines can interleave port 0x80
values or share data with a hardware provided covert channel.  This
means KVM should be trapping port 0x80 access, which is really
expensive, or alternatively, Linux should not be using port 0x80 for
timing bus access on modern (64-bit) hardware.

I've tried to follow this thread, but with all the jabs, 1-ups, and
obscure legacy hardware pageantry going on, it isn't clear what we're
really doing.

Thanks,

Zach


^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-08 21:43                                                         ` Christer Weinigel
@ 2008-01-08 22:24                                                           ` David P. Reed
  0 siblings, 0 replies; 61+ messages in thread
From: David P. Reed @ 2008-01-08 22:24 UTC (permalink / raw)
  To: Christer Weinigel
  Cc: Ondrej Zary, H. Peter Anvin, Rene Herman, Bodo Eggert,
	Ingo Molnar, Alan Cox, Paul Rolland, Pavel Machek,
	Thomas Gleixner, linux-kernel, Ingo Molnar, rol

Christer Weinigel wrote:
> Argument by personal authority.  Thats good.
There is no other kind of argument.  Are you claiming supernatural 
authority drives your typing fingers, or is your argument based on what 
you think you know?  I have piles of code that I wrote, spec sheets (now 
that I'm back in my home office), code that others wrote at the time, 
and documentation from vendors that come from my personal experiences.  
That doesn't mean I'm always right - always happy to learn something 
new.  Just don't condescend to a 55 year old who has been writing 
operating systems, compilers, and designing hardware for almost 40 years 
professionally (yes, I got my first job at 16 writing FORTRAN code to 
simulate hydrodynamic systems).
> I guess that's why you
> don't seem to understand the difference between reading the serial port
> status register and not being allowed to access a register at all
> due to such this as the 4 cycle delay you quoted yourself from the 8390
> data sheet,
If you read what I said carefully, I said that the 8390 was a very 
special case.   The "chip select" problem it experienced was pretty much 
unique among boards of the time.  Those of us who looked at its design 
and had any experience designing hardware for buses like the unibus or 
even the buses on PDP-8's and DG machines thought it had to be a joke.  
Of course it saved money per board, so it beat the 3Com boards on price 
- and you could program it after a fashion.  So it involved "cheaping out".

The normal timing problem was that an out or in operation to a board or 
chip required some time to elapse before the chip performed the side 
effects internally so that the next operation to it would have an 
effect.  This is exactly the reason why most chips and boards are 
designed to either have a polling of a flag indicate operation 
completion.  The serial "buffer empty" flag is the simplest possible 
explanatory example of such handshaking that came to mind (writing a 
character to a serial output device twice often leads to surprises, 
unless you wait for the previous character to clock out).  See my 
comment on RTC below, for a more complex to explain example.
> and similar issues with the I8253 that I quoted from its
> data sheet a few posts ago.
>
>   
The 8253 was a motherboard chip.  I am not sure it had any timing 
problems with its electrical signalling.  I just don't remember.  The 
spec sheet doesn't say it's internal state can get scrambled.
>
> I was thinking of another timer, the RTC which is usually a part of the
> Super I/O.
The RTC has very well documented timing requirements.  But none of the 
spec sheets, nor my experience with it, mention electrical issues that 
prevented back-to-back port operations.  The documented timing 
requirements have to do with the state during the time it ticks over 
internally once per second.  But it is carefully designed to have a flag 
that is "on" during 244 microseconds prior to and covering the time it 
is unsafe to read the registers.   That design is special because it is 
designed to operate when the machine is powered off, so it has two 
internal clock domains, one of which is used in "low power" mode and is 
very slow to minimize power.


^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-08 20:28                                                       ` David P. Reed
@ 2008-01-08 21:43                                                         ` Christer Weinigel
  2008-01-08 22:24                                                           ` David P. Reed
  0 siblings, 1 reply; 61+ messages in thread
From: Christer Weinigel @ 2008-01-08 21:43 UTC (permalink / raw)
  To: David P. Reed
  Cc: Ondrej Zary, H. Peter Anvin, Rene Herman, Bodo Eggert,
	Ingo Molnar, Alan Cox, Paul Rolland, Pavel Machek,
	Thomas Gleixner, linux-kernel, Ingo Molnar, rol

On Tue, 08 Jan 2008 15:28:03 -0500
"David P. Reed" <dpreed@reed.com> wrote:

> Register compatible.  Not  the same chips or even the same  masks or 
> timing requirements.

No, but somehow people keep making similar mistakes.  The DEC HiNote
needed outb_p to function correctly?  That was definitely a much more
modern design than the original PC and most probably did not use any
discrete Intel chips, but the same timing problems were there.  I belive
that problem had to do with the keyboard controller though.

> > The discrete Intel
> > chips or clones got aggregated into Super I/O chips, and the Super
> > I/O chips were put on a LPC bus (an ISA bus with another name) or
> > integrated into the southbrige.
> Don't try to teach your grandmother to suck eggs: I've been
> programming PC compatibles since probably before you were able to do
> long division - including writing code on the first prototype IBM
> PCs, the first pre-manufacturing PC-ATs, and zillions of clones.
> (and I was also involved in designing hardware including the
> so-called "Lotus Intel" expanded memory cards and the original PC
> cards)  

Argument by personal authority.  Thats good.  I guess that's why you
don't seem to understand the difference between reading the serial port
status register and not being allowed to access a register at all
due to such this as the 4 cycle delay you quoted yourself from the 8390
data sheet, and similar issues with the I8253 that I quoted from its
data sheet a few posts ago.

> The 8259 PIC is an *interrupt controller*. It was NEVER
> present in a Super I/O chip, or an LPC chip.  Its functionality was
> absorbed into the chipsets that control interrupt mapping, like the
> PIIX and the nForce. 

Yup, sorry about that, it got integrated into some other chip instead.
I was thinking of another timer, the RTC which is usually a part of the
Super I/O. And which is yet another troublesome area since apparently a
lot of chipsets have problems with it.  But the sequence is the same,
discrete chips get aggregated into larger chips. Sometimes the
sometimes old macrocells are reused, sometimes they are redesigned from
scratch (and new bugs are introduced).

> > And the "if it ain't broken, don't fix
> > it" mantra probably means that some modern chipsets are still using
> > exactly the same internal design as the 25 year old chips and will
> > still be subject to some of those ancient limitations.
> >   
> Oh, come on.  Give the VLSI designers some credit for brains.   The
> CAD tools used to design the 8259 and 8253 were so primitive you
> couldn't even get a chip manufactured with designs from that era
> today.  When people design chips today they do it with simulators
> that can't even work, and testers that run from test suites that were
> not available at the time.

And they still keep making the same mistakes...  Registers that require
wait states before being read again, register that assume that there
are going to be some spare cycles between each access so that some
internal logic has time to update, registers that would have needed a
one byte FIFO to avoid DMA overruns (I'd almost forgotten about that
specific bug on SPI controller of the Samsung 2410, but it bit me last
week and I only managed to chase it down properly yesterday), and so on.

I'm quite impressed with what some VLSI designers manage to do.  I just
saw a company roll out a completely new ARM9 design with lots of fun
stuff and as far as I know they only made one single mistake on that
chip.  On the other hand, on other designs you can see how the same old
macrocell has been reused long past the "best before" date, because
some bugs crop up over and over again.  

  /Christer

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-08 19:25                                                     ` Christer Weinigel
@ 2008-01-08 20:28                                                       ` David P. Reed
  2008-01-08 21:43                                                         ` Christer Weinigel
  0 siblings, 1 reply; 61+ messages in thread
From: David P. Reed @ 2008-01-08 20:28 UTC (permalink / raw)
  To: Christer Weinigel
  Cc: Ondrej Zary, H. Peter Anvin, Rene Herman, Bodo Eggert,
	Ingo Molnar, Alan Cox, Paul Rolland, Pavel Machek,
	Thomas Gleixner, linux-kernel, Ingo Molnar, rol


Christer Weinigel wrote:
>> There is no need to use io writes to supposedly/theoretically "unused 
>> ports" to make drivers work on any bus.
>> ISA included!  You can, for example, wait for an ISA bus serial
>> adapter to put out its next character by looping reading the port
>> that has the output buffer full flag in a tight loop, with no delay
>> code at all.  And if you need to time things, just call a timing loop
>> subroutine that you calibrate at boot time.
>>     
>
> Now you're totally confusing things.  You're talking about looking at
> bits in a register to see if a transmit register is empty.  
> That's easy.
>
> The delays needed for the Intel M8259 and M8253 say that you're not
> even allowed to access the registers _at_ _all_ for some time after a
> register access.  If you do a write to a register immediately followed
> by any access, including a read of the status register, you can corrupt
> the state of the chip.
>   
Not true.  Even on the original IBM 5150 PC, the 8259 on the motherboard 
accepted back to back  OUT and IN instructions, and it would NOT trash 
the chip state.  You can read the original IBM BIOS code if you like.  I 
don't remember about the 8253's timing.  I doubt the chip's state would 
be corrupted in any way. The data and address lines were the same data 
and address lines that the microprocessor used to access memory - it 
didn't "hold" the lines stable any longer than the OUT instruction.
> And the Intel chips are not the only ones with that kind of brain
> damage.  But what makes the 8259 and 8253 a big problem is that every
> modern PC has a descendant of those chips in them.
Register compatible.  Not  the same chips or even the same  masks or 
timing requirements.
> The discrete Intel
> chips or clones got aggregated into Super I/O chips, and the Super I/O
> chips were put on a LPC bus (an ISA bus with another name) or
> integrated into the southbrige.
Don't try to teach your grandmother to suck eggs: I've been programming 
PC compatibles since probably before you were able to do long division - 
including writing code on the first prototype IBM PCs, the first 
pre-manufacturing PC-ATs, and zillions of clones.  (and I was also 
involved in designing hardware including the so-called "Lotus Intel" 
expanded memory cards and the original PC cards)  The 8259 PIC is an 
*interrupt controller*. It was NEVER present in a Super I/O chip, or an 
LPC chip.  Its functionality was absorbed into the chipsets that control 
interrupt mapping, like the PIIX and the nForce. 

> And the "if it ain't broken, don't fix
> it" mantra probably means that some modern chipsets are still using
> exactly the same internal design as the 25 year old chips and will
> still be subject to some of those ancient limitations.
>   
Oh, come on.  Give the VLSI designers some credit for brains.   The CAD 
tools used to design the 8259 and 8253 were so primitive you couldn't 
even get a chip manufactured with designs from that era today.  When 
people design chips today they do it with simulators that can't even 
work, and testers that run from test suites that were not available at 
the time.

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-08 19:23                                                         ` Alan Cox
@ 2008-01-08 19:51                                                           ` David P. Reed
  0 siblings, 0 replies; 61+ messages in thread
From: David P. Reed @ 2008-01-08 19:51 UTC (permalink / raw)
  To: Alan Cox
  Cc: Ondrej Zary, H. Peter Anvin, Rene Herman, Bodo Eggert,
	Christer Weinigel, Ingo Molnar, Paul Rolland, Pavel Machek,
	Thomas Gleixner, linux-kernel, Ingo Molnar, rol

Alan -

I dug up a DP83901A SNIC datasheet in a quick Google search, while that 
wasn't the only such chip, it was one of them.  I can forward the PDF 
(the www.alldatasheet.com site dynamically creates the download URL), if 
anyone wants it.
The relevant passage says, in regard to delaying between checking the 
CRDA addresses to see if a dummy "remote read" has been executed., and 
in regard perhaps to other card IO register loops: 
                                                         

    TIME BETWEEN CHIP SELECTS
                                                                 
    The SNIC requires that successive chip selects be no
    closer                                                     
    than 4 bus clocks (BSCK) together. If the condition is
    violat-                                           
    ed the SNIC may glitch ACK. CPUs that operate from pipe-
    lined instructions (i e 386) or have a cache (i e 486) can
    execute consecutive I O cycles very quickly The solution is
    to delay the execution of consecutive I O cycles by either
    breaking the pipeline or forcing the CPU to access outside
    its cache.

The NE2000 as I recall had no special logic on the board to protect the 
chip from successive chip selects that were too close - which is the 
reason for the problem. Clearly an out to port 80 takes more than 4 ISA 
bus clocks, so that works if the NE2000 is on the ISA bus,   On the 
other hand, there are other ways to delay more than 4 ISA bus clocks.  
And as you say, one needs a delay for this chip that relates to the 
chip's card's bus's clock speed, not absolute time.

Alan Cox wrote:
>> As well you should. I am honestly curious (for my own satisfaction) as 
>> to what the natsemi docs say the delay code should do  (can't imagine 
>> they say "use io port 80 because it is unused").  I don't have any 
>>     
>
> They say you must allow 4 bus clocks for the address decode. They don't
> deal with the ISA side as the chip itself has no ISA glue.
>
>
>   
>> copies anymore. But mere curiosity on my part is not worth spending a 
>> lot of time on - I know you are super busy.   If there's a copy online 
>> at a URL ...
>>     
>
> Not that I know of. There may be. A good general source of info is Russ
> Nelson's old DOS packet driver collection.
>
>
>   

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-08 18:44                                                   ` David P. Reed
  2008-01-08 18:51                                                     ` Alan Cox
@ 2008-01-08 19:25                                                     ` Christer Weinigel
  2008-01-08 20:28                                                       ` David P. Reed
  1 sibling, 1 reply; 61+ messages in thread
From: Christer Weinigel @ 2008-01-08 19:25 UTC (permalink / raw)
  To: David P. Reed
  Cc: Ondrej Zary, H. Peter Anvin, Rene Herman, Bodo Eggert,
	Ingo Molnar, Alan Cox, Paul Rolland, Pavel Machek,
	Thomas Gleixner, linux-kernel, Ingo Molnar, rol

On Tue, 08 Jan 2008 13:44:54 -0500
"David P. Reed" <dpreed@reed.com> wrote:

> Ondrej Zary wrote:
> > On Tuesday 08 January 2008 18:24:02 David P. Reed wrote:
> >   
> >> Windows these days does delays with timing loops or the
> >> scheduler.  It doesn't use a "port".  Also, Windows XP only
> >> supports machines that tend not to have timing problems that use
> >> delays.  Instead, if a device takes a while to respond, it has a
> >> "busy bit" in some port or memory slot that can be tested.
> >>     
> There is no need to use io writes to supposedly/theoretically "unused 
> ports" to make drivers work on any bus.
> ISA included!  You can, for example, wait for an ISA bus serial
> adapter to put out its next character by looping reading the port
> that has the output buffer full flag in a tight loop, with no delay
> code at all.  And if you need to time things, just call a timing loop
> subroutine that you calibrate at boot time.

Now you're totally confusing things.  You're talking about looking at
bits in a register to see if a transmit register is empty.  
That's easy.

The delays needed for the Intel M8259 and M8253 say that you're not
even allowed to access the registers _at_ _all_ for some time after a
register access.  If you do a write to a register immediately followed
by any access, including a read of the status register, you can corrupt
the state of the chip.

And the Intel chips are not the only ones with that kind of brain
damage.  But what makes the 8259 and 8253 a big problem is that every
modern PC has a descendant of those chips in them.  The discrete Intel
chips or clones got aggregated into Super I/O chips, and the Super I/O
chips were put on a LPC bus (an ISA bus with another name) or
integrated into the southbrige.  And the "if it ain't broken, don't fix
it" mantra probably means that some modern chipsets are still using
exactly the same internal design as the 25 year old chips and will
still be subject to some of those ancient limitations.

  /Christer

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-08 19:15                                                       ` David P. Reed
@ 2008-01-08 19:23                                                         ` Alan Cox
  2008-01-08 19:51                                                           ` David P. Reed
  2008-01-09  2:52                                                         ` Zachary Amsden
  1 sibling, 1 reply; 61+ messages in thread
From: Alan Cox @ 2008-01-08 19:23 UTC (permalink / raw)
  To: David P. Reed
  Cc: Ondrej Zary, H. Peter Anvin, Rene Herman, Bodo Eggert,
	Christer Weinigel, Ingo Molnar, Paul Rolland, Pavel Machek,
	Thomas Gleixner, linux-kernel, Ingo Molnar, rol

> As well you should. I am honestly curious (for my own satisfaction) as 
> to what the natsemi docs say the delay code should do  (can't imagine 
> they say "use io port 80 because it is unused").  I don't have any 

They say you must allow 4 bus clocks for the address decode. They don't
deal with the ISA side as the chip itself has no ISA glue.


> copies anymore. But mere curiosity on my part is not worth spending a 
> lot of time on - I know you are super busy.   If there's a copy online 
> at a URL ...

Not that I know of. There may be. A good general source of info is Russ
Nelson's old DOS packet driver collection.


^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-08 18:51                                                     ` Alan Cox
@ 2008-01-08 19:15                                                       ` David P. Reed
  2008-01-08 19:23                                                         ` Alan Cox
  2008-01-09  2:52                                                         ` Zachary Amsden
  0 siblings, 2 replies; 61+ messages in thread
From: David P. Reed @ 2008-01-08 19:15 UTC (permalink / raw)
  To: Alan Cox
  Cc: Ondrej Zary, H. Peter Anvin, Rene Herman, Bodo Eggert,
	Christer Weinigel, Ingo Molnar, Paul Rolland, Pavel Machek,
	Thomas Gleixner, linux-kernel, Ingo Molnar, rol

Alan Cox wrote:
> The natsemi docs here say otherwise. I trust them not you.
>   
As well you should. I am honestly curious (for my own satisfaction) as 
to what the natsemi docs say the delay code should do  (can't imagine 
they say "use io port 80 because it is unused").  I don't have any 
copies anymore. But mere curiosity on my part is not worth spending a 
lot of time on - I know you are super busy.   If there's a copy online 
at a URL ...
>
> The problem is that certain people, unfortunately those who know
> nothing about ISA related bus systems, keep trying to confuse ISA delay
> logic with core chip logic and end up trying to solve both a problem and a
> non-problem in one, creating a nasty mess in the process.
>
>   
I agree that the problems of chip logic and ISA delay are all tangled 
up, probably more than need be.  I hope that the solution turns out to 
simplify matters, and hopefully to document the intention of the 
resulting code sections a bit more clearly for the future.

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-08 18:51                                                   ` Bodo Eggert
@ 2008-01-08 19:13                                                     ` Ondrej Zary
  0 siblings, 0 replies; 61+ messages in thread
From: Ondrej Zary @ 2008-01-08 19:13 UTC (permalink / raw)
  To: Bodo Eggert
  Cc: David P. Reed, H. Peter Anvin, Rene Herman, Christer Weinigel,
	Ingo Molnar, Alan Cox, Paul Rolland, Pavel Machek,
	Thomas Gleixner, linux-kernel, Ingo Molnar, rol

On Tuesday 08 January 2008 19:51:41 Bodo Eggert wrote:
> On Tue, 8 Jan 2008, Ondrej Zary wrote:
> > On Tuesday 08 January 2008 18:24:02 David P. Reed wrote:
> > > Windows these days does delays with timing loops or the scheduler.  It
> > > doesn't use a "port".  Also, Windows XP only supports machines that
> > > tend not to have timing problems that use delays.  Instead, if a device
> > > takes a while to respond, it has a "busy bit" in some port or memory
> > > slot that can be tested.
> >
> > Windows XP can run on a machine with ISA slot(s) and has built-in drivers
> > for some plug&play ISA cards - e.g. the famous 3Com EtherLink III. I
> > think that there's a driver for NE2000-compatible cards too and it
> > probably works.
>
> The NE2K-driver went missing in W2K. BTDT.

Haven't tried personally but it seems to work accroding to this 
http://www.windowsnetworking.com/articles_tutorials/wxpne2k.html - and it can 
be made to work even with non-PnP cards.

-- 
Ondrej Zary

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-08 17:38                                                 ` Ondrej Zary
  2008-01-08 18:44                                                   ` David P. Reed
@ 2008-01-08 18:51                                                   ` Bodo Eggert
  2008-01-08 19:13                                                     ` Ondrej Zary
  1 sibling, 1 reply; 61+ messages in thread
From: Bodo Eggert @ 2008-01-08 18:51 UTC (permalink / raw)
  To: Ondrej Zary
  Cc: David P. Reed, H. Peter Anvin, Rene Herman, Bodo Eggert,
	Christer Weinigel, Ingo Molnar, Alan Cox, Paul Rolland,
	Pavel Machek, Thomas Gleixner, linux-kernel, Ingo Molnar, rol

On Tue, 8 Jan 2008, Ondrej Zary wrote:
> On Tuesday 08 January 2008 18:24:02 David P. Reed wrote:

> > Windows these days does delays with timing loops or the scheduler.  It
> > doesn't use a "port".  Also, Windows XP only supports machines that tend
> > not to have timing problems that use delays.  Instead, if a device takes
> > a while to respond, it has a "busy bit" in some port or memory slot that
> > can be tested.
> 
> Windows XP can run on a machine with ISA slot(s) and has built-in drivers for 
> some plug&play ISA cards - e.g. the famous 3Com EtherLink III. I think that 
> there's a driver for NE2000-compatible cards too and it probably works.

The NE2K-driver went missing in W2K. BTDT.
-- 
Anyone can speak Troll. All you have to do is point and grunt.
	-- Fred Weasley

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-08 18:44                                                   ` David P. Reed
@ 2008-01-08 18:51                                                     ` Alan Cox
  2008-01-08 19:15                                                       ` David P. Reed
  2008-01-08 19:25                                                     ` Christer Weinigel
  1 sibling, 1 reply; 61+ messages in thread
From: Alan Cox @ 2008-01-08 18:51 UTC (permalink / raw)
  To: David P. Reed
  Cc: Ondrej Zary, H. Peter Anvin, Rene Herman, Bodo Eggert,
	Christer Weinigel, Ingo Molnar, Paul Rolland, Pavel Machek,
	Thomas Gleixner, linux-kernel, Ingo Molnar, rol

> There is no need to use io writes to supposedly/theoretically "unused 
> ports" to make drivers work on any bus.

The natsemi docs here say otherwise. I trust them not you.

> don't remember writing a driver for the 3com devices - probably didn't, 
> because 3Com's cards were expensive at the time.

3C503 needs delays for some setups according to the docs. I can't tell
you how the 3COM drivers did it as that was a different bit of 3com to
the bit I worked for. From the rest of 3Com I saw probably utterly
vilely ;)

Later 3Com stuff was either sane (3c509 etc) or used whacko intel chips
(3c507/27) which had their own special breed of insanity to replace
address setup delay bugs.

> In any case, Linux *did* adopt this port 80 strategy - I'm sure all 
> concerned thought it was frightfully clever at the time.  Linus 
> expressed his skepticism in the comments in io.h.  The problem is to 
> safely move away from it toward a proper strategy 

No. The problem is that certain people, unfortunately those who know
nothing about ISA related bus systems, keep trying to confuse ISA delay
logic with core chip logic and end up trying to solve both a problem and a
non-problem in one, creating a nasty mess in the process.

Alan

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-08 17:38                                                 ` Ondrej Zary
@ 2008-01-08 18:44                                                   ` David P. Reed
  2008-01-08 18:51                                                     ` Alan Cox
  2008-01-08 19:25                                                     ` Christer Weinigel
  2008-01-08 18:51                                                   ` Bodo Eggert
  1 sibling, 2 replies; 61+ messages in thread
From: David P. Reed @ 2008-01-08 18:44 UTC (permalink / raw)
  To: Ondrej Zary
  Cc: H. Peter Anvin, Rene Herman, Bodo Eggert, Christer Weinigel,
	Ingo Molnar, Alan Cox, Paul Rolland, Pavel Machek,
	Thomas Gleixner, linux-kernel, Ingo Molnar, rol



Ondrej Zary wrote:
> On Tuesday 08 January 2008 18:24:02 David P. Reed wrote:
>   
>> Windows these days does delays with timing loops or the scheduler.  It
>> doesn't use a "port".  Also, Windows XP only supports machines that tend
>> not to have timing problems that use delays.  Instead, if a device takes
>> a while to respond, it has a "busy bit" in some port or memory slot that
>> can be tested.
>>     
>
> Windows XP can run on a machine with ISA slot(s) and has built-in drivers for 
> some plug&play ISA cards - e.g. the famous 3Com EtherLink III. I think that 
> there's a driver for NE2000-compatible cards too and it probably works.
>   
There is no need to use io writes to supposedly/theoretically "unused 
ports" to make drivers work on any bus.
ISA included!  You can, for example, wait for an ISA bus serial adapter 
to put out its next character by looping reading the port that has the 
output buffer full flag in a tight loop, with no delay code at all.  And 
if you need to time things, just call a timing loop subroutine that you 
calibrate at boot time.
I wrote DOS drivers for NE2000's on the ISA bus when they were brand new 
designs from Novell without such kludges as writes to I/O port 80.  I 
don't remember writing a driver for the 3com devices - probably didn't, 
because 3Com's cards were expensive at the time.

In any case, Linux *did* adopt this port 80 strategy - I'm sure all 
concerned thought it was frightfully clever at the time.  Linus 
expressed his skepticism in the comments in io.h.  The problem is to 
safely move away from it toward a proper strategy that doesn't depend on 
"bus aborts" which would trigger machine checks if they were properly 
enabled.


^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-08 17:24                                               ` David P. Reed
@ 2008-01-08 17:38                                                 ` Ondrej Zary
  2008-01-08 18:44                                                   ` David P. Reed
  2008-01-08 18:51                                                   ` Bodo Eggert
  0 siblings, 2 replies; 61+ messages in thread
From: Ondrej Zary @ 2008-01-08 17:38 UTC (permalink / raw)
  To: David P. Reed
  Cc: H. Peter Anvin, Rene Herman, Bodo Eggert, Christer Weinigel,
	Ingo Molnar, Alan Cox, Paul Rolland, Pavel Machek,
	Thomas Gleixner, linux-kernel, Ingo Molnar, rol

On Tuesday 08 January 2008 18:24:02 David P. Reed wrote:
> Windows these days does delays with timing loops or the scheduler.  It
> doesn't use a "port".  Also, Windows XP only supports machines that tend
> not to have timing problems that use delays.  Instead, if a device takes
> a while to respond, it has a "busy bit" in some port or memory slot that
> can be tested.

Windows XP can run on a machine with ISA slot(s) and has built-in drivers for 
some plug&play ISA cards - e.g. the famous 3Com EtherLink III. I think that 
there's a driver for NE2000-compatible cards too and it probably works.

> Almost all of the issues in Linux where _p operations are used are (or
> should be) historical - IMO.
>
> Ondrej Zary wrote:
> > On Tuesday 08 January 2008 02:38:15 David P. Reed wrote:
> >> H. Peter Anvin wrote:
> >>> And shoot the designer of this particular microcontroller firmware.
> >>
> >> Well, some days I want to shoot the "designer" of the entire Wintel
> >> architecture...  it's not exactly "designed" by anybody of course, and
> >> today it's created largely by a collection of Taiwanese and Chinese ODM
> >> firms, coupled with Microsoft WinHEC and Intel folks.  At least they
> >> follow the rules and their ACPI and BIOS code say that they are using
> >> port 80 very clearly if you use PnP and ACPI properly.  And in the old
> >> days, you were "supposed" to use the system BIOS to talk to things like
> >> the PIT that had timing issues, not write your own code.
> >
> > Does anyone know what port does Windows use? I'm pretty sure that it
> > isn't 80h as I run Windows 98 often with port 80h debug card inserted.
> > The last POST code set by BIOS usually remains on the display and only
> > changes when BIOS does something like suspend/resume. IIRC, there was a
> > program that was able to display temperature from onboard sensors on the
> > port 80h display that's integrated on some mainboards.
>
> --
> 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/



-- 
Ondrej Zary

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-08 17:10                                             ` Ondrej Zary
@ 2008-01-08 17:24                                               ` David P. Reed
  2008-01-08 17:38                                                 ` Ondrej Zary
  0 siblings, 1 reply; 61+ messages in thread
From: David P. Reed @ 2008-01-08 17:24 UTC (permalink / raw)
  To: Ondrej Zary
  Cc: H. Peter Anvin, Rene Herman, Bodo Eggert, Christer Weinigel,
	Ingo Molnar, Alan Cox, Paul Rolland, Pavel Machek,
	Thomas Gleixner, linux-kernel, Ingo Molnar, rol

Windows these days does delays with timing loops or the scheduler.  It 
doesn't use a "port".  Also, Windows XP only supports machines that tend 
not to have timing problems that use delays.  Instead, if a device takes 
a while to respond, it has a "busy bit" in some port or memory slot that 
can be tested.

Almost all of the issues in Linux where _p operations are used are (or 
should be) historical - IMO.

Ondrej Zary wrote:
> On Tuesday 08 January 2008 02:38:15 David P. Reed wrote:
>   
>> H. Peter Anvin wrote:
>>     
>>> And shoot the designer of this particular microcontroller firmware.
>>>       
>> Well, some days I want to shoot the "designer" of the entire Wintel
>> architecture...  it's not exactly "designed" by anybody of course, and
>> today it's created largely by a collection of Taiwanese and Chinese ODM
>> firms, coupled with Microsoft WinHEC and Intel folks.  At least they
>> follow the rules and their ACPI and BIOS code say that they are using
>> port 80 very clearly if you use PnP and ACPI properly.  And in the old
>> days, you were "supposed" to use the system BIOS to talk to things like
>> the PIT that had timing issues, not write your own code.
>>     
>
> Does anyone know what port does Windows use? I'm pretty sure that it isn't 80h 
> as I run Windows 98 often with port 80h debug card inserted. The last POST 
> code set by BIOS usually remains on the display and only changes when BIOS 
> does something like suspend/resume. IIRC, there was a program that was able 
> to display temperature from onboard sensors on the port 80h display that's 
> integrated on some mainboards.
>
>   

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-08  1:38                                           ` David P. Reed
@ 2008-01-08 17:10                                             ` Ondrej Zary
  2008-01-08 17:24                                               ` David P. Reed
  0 siblings, 1 reply; 61+ messages in thread
From: Ondrej Zary @ 2008-01-08 17:10 UTC (permalink / raw)
  To: David P. Reed
  Cc: H. Peter Anvin, Rene Herman, Bodo Eggert, Christer Weinigel,
	Ingo Molnar, Alan Cox, Paul Rolland, Pavel Machek,
	Thomas Gleixner, linux-kernel, Ingo Molnar, rol

On Tuesday 08 January 2008 02:38:15 David P. Reed wrote:
> H. Peter Anvin wrote:
> > And shoot the designer of this particular microcontroller firmware.
>
> Well, some days I want to shoot the "designer" of the entire Wintel
> architecture...  it's not exactly "designed" by anybody of course, and
> today it's created largely by a collection of Taiwanese and Chinese ODM
> firms, coupled with Microsoft WinHEC and Intel folks.  At least they
> follow the rules and their ACPI and BIOS code say that they are using
> port 80 very clearly if you use PnP and ACPI properly.  And in the old
> days, you were "supposed" to use the system BIOS to talk to things like
> the PIT that had timing issues, not write your own code.

Does anyone know what port does Windows use? I'm pretty sure that it isn't 80h 
as I run Windows 98 often with port 80h debug card inserted. The last POST 
code set by BIOS usually remains on the display and only changes when BIOS 
does something like suspend/resume. IIRC, there was a program that was able 
to display temperature from onboard sensors on the port 80h display that's 
integrated on some mainboards.

-- 
Ondrej Zary

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-08 13:07                                         ` [linux-kernel] " David P. Reed
@ 2008-01-08 14:37                                           ` Alan Cox
  0 siblings, 0 replies; 61+ messages in thread
From: Alan Cox @ 2008-01-08 14:37 UTC (permalink / raw)
  To: David P. Reed
  Cc: Bodo Eggert, Rene Herman, H. Peter Anvin, Christer Weinigel,
	Ingo Molnar, Paul Rolland, Pavel Machek, Thomas Gleixner,
	linux-kernel, Ingo Molnar, rol

> The last time I heard of a 12 MHz bus in a PC system was in the days of 
> the PC-AT, when some clone makers sped up their buses (pre PCI!!!) in an 
> attempt to allow adapter card *memory* to run at the 12 MHz speed.

It wasn't about clone makers speeding up their busses. The ISA bus
originally ran at the CPU clock - 4.77/8/6/10 .. etc. Quite a few board
makers assumed 8MHz and while faster isn't a big problem at 8bit trying
to do the 8/16 bit decode with logic chips at 8MHz is quite tight and
above that generally broke. 8bit tends to work fine because you've got a
lot more timing headroom.

> I can't believe that we are not supporting today's machines correctly 
> because we are still trying to be compatible with a few (at most a 
> hundre thousand were manufactured!  Much less still functioning or 
> running Linux) machines.

It is about supporting this properly. Properly for ISA devices means
using I/O delays. Properly for chipset devices is probably using udelay.

> Now I understand that PC/104 machines and other things are very non PC 
> compatible, but are x86 processor architectures.  Do they even run x86 
> under 2.6.24?

Linux runs on x86, it isn't limited to PC type architectures at all. We
don't need a BIOS, we don't need legacy compatible I/O devices.

> for "relics" and develop a merged architecture called "modern machines" 
> to include only those PCs that have been made to work since, say, the 
> release of (cough) WIndows 2000?

No point. We've got the 64bit kernel for that. That is a much saner
boundary to throw out all the nutty stuff.

Alan

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-08 12:51                                       ` Bodo Eggert
@ 2008-01-08 13:07                                         ` David P. Reed
  2008-01-08 14:37                                           ` Alan Cox
  0 siblings, 1 reply; 61+ messages in thread
From: David P. Reed @ 2008-01-08 13:07 UTC (permalink / raw)
  To: Bodo Eggert
  Cc: Rene Herman, H. Peter Anvin, Christer Weinigel, Ingo Molnar,
	Alan Cox, Paul Rolland, Pavel Machek, Thomas Gleixner,
	linux-kernel, Ingo Molnar, rol

The last time I heard of a 12 MHz bus in a PC system was in the days of 
the PC-AT, when some clone makers sped up their buses (pre PCI!!!) in an 
attempt to allow adapter card *memory* to run at the 12 MHz speed.

This caused so many industry-wide problems with adapter cards that 
couldn't be installed in certain machines and still run reliably that 
the industry learned a lesson.  That doesn't mean that LPCs don't run at 
12 MHz, but if they do, they don't have old 8 bit punky cards plugged 
into them for lots of practical reasons.  (I have whole drawers full of 
such old cards, trying to figure out an environmentally responsible way 
to get rid of them - even third world countries would be fools to make 
machiens with them).

I can't believe that we are not supporting today's machines correctly 
because we are still trying to be compatible with a few (at most a 
hundre thousand were manufactured!  Much less still functioning or 
running Linux) machines.

Now I understand that PC/104 machines and other things are very non PC 
compatible, but are x86 processor architectures.  Do they even run x86 
under 2.6.24?

Perhaps the rational solution here is to declare x86 the architecture 
for "relics" and develop a merged architecture called "modern machines" 
to include only those PCs that have been made to work since, say, the 
release of (cough) WIndows 2000?

Bodo Eggert wrote:
> On Tue, 8 Jan 2008, Rene Herman wrote:
>   
>> On 08-01-08 00:24, H. Peter Anvin wrote:
>>     
>>> Rene Herman wrote:
>>>       
>
>   
>>>> Is this only about the ones then left for things like legacy PIC and PIT?
>>>> Does anyone care about just sticking in a udelay(2) (or 1) there as a
>>>> replacement and call it a day?
>>>>
>>>>         
>>> PIT is problematic because the PIT may be necessary for udelay setup.
>>>       
>> Yes, can initialise loops_per_jiffy conservatively. Just didn't quite get why
>> you guys are talking about an ISA bus speed parameter.
>>     
>
> If the ISA bus is below 8 MHz, we might need a longer delay. If we default
> to the longer delay, the delay will be too long for more than 99,99 % of 
> all systems, not counting i586+. Especially if the driver is fine-tuned to 
> give maximum throughput, this may be bad.
>
> OTOH, the DOS drivers I heared about use delays and would break on 
> underclocked ISA busses if the n * ISA_HZ delay was needed. Maybe
> somebody having a configurable ISA bus speed and some problematic
> chips can test it ...
>
>   

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-07 23:57                                     ` David P. Reed
@ 2008-01-08  1:58                                       ` Alan Cox
  0 siblings, 0 replies; 61+ messages in thread
From: Alan Cox @ 2008-01-08  1:58 UTC (permalink / raw)
  To: David P. Reed
  Cc: H. Peter Anvin, Rene Herman, Bodo Eggert, Christer Weinigel,
	Ingo Molnar, Rene Herman, Paul Rolland, Pavel Machek,
	Thomas Gleixner, linux-kernel, Ingo Molnar, rol

> The PIT usage for calibrating the delay loop can be moderated, if need 
> by, by using the PC BIOS which by definition uses the PIT correctly it 
> its int 15 function 83 call..   Just do it before coming up in a state 
> where the PC BIOS int 15h calls no longer work.  I gave code to do this 
> in a much earlier message.

And as I've said before we don't know if we have a PC BIOS. If we are
running from a kexec or on a Macintoy with EFI or an Xbox we may not.

As per previous discussions for the PIT we can simply guess a safe
initial udelay value and then tune the real one.

Alan

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-08  0:13                                         ` H. Peter Anvin
@ 2008-01-08  1:38                                           ` David P. Reed
  2008-01-08 17:10                                             ` Ondrej Zary
  0 siblings, 1 reply; 61+ messages in thread
From: David P. Reed @ 2008-01-08  1:38 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Rene Herman, Bodo Eggert, Christer Weinigel, Ingo Molnar,
	Alan Cox, Paul Rolland, Pavel Machek, Thomas Gleixner,
	linux-kernel, Ingo Molnar, rol

H. Peter Anvin wrote:
>
> And shoot the designer of this particular microcontroller firmware.
>
>  
Well, some days I want to shoot the "designer" of the entire Wintel 
architecture...  it's not exactly "designed" by anybody of course, and 
today it's created largely by a collection of Taiwanese and Chinese ODM 
firms, coupled with Microsoft WinHEC and Intel folks.  At least they 
follow the rules and their ACPI and BIOS code say that they are using 
port 80 very clearly if you use PnP and ACPI properly.  And in the old 
days, you were "supposed" to use the system BIOS to talk to things like 
the PIT that had timing issues, not write your own code.

Or perhaps the ACPI spec should specify a timing loop spec and precisely 
specify the desired timing after accessing an I/O port till that device 
has properly "acted" on that operation.

The idea that Port 80 was "unused" and appropriate for delay purposes 
elicited skepticism by Linus that is recorded for posterity in the 
comments of the relevant Linux include files - especially since it was 
clearly "used" for non-delay purposes, by cards that could be plugged 
into a PCI (fast), not just an 8-bit ISA, bus.

Perhaps we should declare the world of ACPI systems a separate "arch" 
from the world of l'ancien regime where folklore about which ports were 
used for what ruled.   I lived through those old days, and they were not 
wonderful, either.

The world sucks, and Linux is supposed to be able to adapt to that 
world, suckitude and all.


^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-08  0:10                                       ` [linux-kernel] " David P. Reed
@ 2008-01-08  0:13                                         ` H. Peter Anvin
  2008-01-08  1:38                                           ` David P. Reed
  0 siblings, 1 reply; 61+ messages in thread
From: H. Peter Anvin @ 2008-01-08  0:13 UTC (permalink / raw)
  To: David P. Reed
  Cc: Rene Herman, Bodo Eggert, Christer Weinigel, Ingo Molnar,
	Alan Cox, Paul Rolland, Pavel Machek, Thomas Gleixner,
	linux-kernel, Ingo Molnar, rol

David P. Reed wrote:
> 
> And actually, if I had looked at the /sys/bus/pnp definitions, rather 
> than /proc/ioports, I would have noticed that port 80 was part of a 
> PNP0C02 resource set.   That means exactly one thing:  ACPI says that 
> port 80 is NOT free to be used, for delays or anything else.
> 
> This should make no difference here: it's just one more reason to stop 
> using port 80 for delays on modern machines.
> 

And shoot the designer of this particular microcontroller firmware.

	-hpa

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-07 23:26                                     ` Rene Herman
@ 2008-01-08  0:10                                       ` David P. Reed
  2008-01-08  0:13                                         ` H. Peter Anvin
  2008-01-08 12:51                                       ` Bodo Eggert
  1 sibling, 1 reply; 61+ messages in thread
From: David P. Reed @ 2008-01-08  0:10 UTC (permalink / raw)
  To: Rene Herman
  Cc: H. Peter Anvin, Bodo Eggert, Christer Weinigel, Ingo Molnar,
	Alan Cox, Paul Rolland, Pavel Machek, Thomas Gleixner,
	linux-kernel, Ingo Molnar, rol

On another topic.  I have indeed determined what device uses port 80 on 
Quanta AMD64 laptops from HP.

I had lunch with Jim Gettys of OLPC a week ago; he's an old friend since 
he worked on the original X windows system.   After telling him my story 
about port 80, he mentioned that the OLPC XO machine had some issues 
with port 80 which was by design handled by the ENE KBC device on its 
motherboard.   He said the ENE was a very desirable chipset for AMD 
designs recommended by Quanta.  Richard Smith of OLPC explained to me 
how the KB3700 they use works, and that they use the KB3700 to send POST 
codes out over a serial link during boot up.

This gave me a reason to take apart my laptop, to discover that it has 
an ENE KB3920 B0 as its EC and KBC.  The port interface for the KB3920 
includes listening to port 80 which is then made available to firmware 
on the EC.  It is recognized and decoded on the LPC bus, only for 
writes, and optionally can generate an interrupt in the 8051.

Dumping both the ENE chip, and looking at the DSDT.dsl for my machine, I 
discovered that port 80 is used as an additional parameter for various 
DSDT methods that communicate to the EC, when it is operating in ACPI mode.

More work is in progress as I play around with this.  But the key thing 
is that ACPI and perhaps SMM both use port 80 as part of the base 
function of the chipset.

And actually, if I had looked at the /sys/bus/pnp definitions, rather 
than /proc/ioports, I would have noticed that port 80 was part of a 
PNP0C02 resource set.   That means exactly one thing:  ACPI says that 
port 80 is NOT free to be used, for delays or anything else.

This should make no difference here: it's just one more reason to stop 
using port 80 for delays on modern machines.


^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-07 23:24                                   ` H. Peter Anvin
  2008-01-07 23:26                                     ` Rene Herman
@ 2008-01-07 23:57                                     ` David P. Reed
  2008-01-08  1:58                                       ` Alan Cox
  1 sibling, 1 reply; 61+ messages in thread
From: David P. Reed @ 2008-01-07 23:57 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Rene Herman, Bodo Eggert, Christer Weinigel, Ingo Molnar,
	Alan Cox, Rene Herman, Paul Rolland, Pavel Machek,
	Thomas Gleixner, linux-kernel, Ingo Molnar, rol



H. Peter Anvin wrote:
> Rene Herman wrote:
>>
>> Is this only about the ones then left for things like legacy PIC and 
>> PIT? Does anyone care about just sticking in a udelay(2) (or 1) there 
>> as a replacement and call it a day?
>>
>
> PIT is problematic because the PIT may be necessary for udelay setup.
>
The PIT usage for calibrating the delay loop can be moderated, if need 
by, by using the PC BIOS which by definition uses the PIT correctly it 
its int 15 function 83 call..   Just do it before coming up in a state 
where the PC BIOS int 15h calls no longer work.  I gave code to do this 
in a much earlier message.

This is the MOST reliable way to use the PIT early in boot, on a PC 
compatible.  God knows how one should do it on a Macintosh running a 
386/20  :-).   But the ONLY old bat-PIT machines are, thank god, PC 
compatible, maybe.


^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-02 13:11                     ` [linux-kernel] " David P. Reed
@ 2008-01-02 13:21                       ` Ingo Molnar
  0 siblings, 0 replies; 61+ messages in thread
From: Ingo Molnar @ 2008-01-02 13:21 UTC (permalink / raw)
  To: David P. Reed
  Cc: Alan Cox, H. Peter Anvin, Rene Herman, Paul Rolland,
	Pavel Machek, Thomas Gleixner, linux-kernel, Ingo Molnar, rol


* David P. Reed <dpreed@reed.com> wrote:

> FYI - another quirky Quanta motherboard from HP, with DMI readings reported 
> to me.

> Using port80.c, I could hard lock a HP Pavilion tx1000 laptop on the 
> first go. This was with ubuntu hardy's stock kernel (a 2.6.24-rc)
>
>> dmidecode -s baseboard-manufacturer
>> dmidecode -s baseboard-product-name
>
> Quanta
> 30BF

thanks, i've updated the patches in x86.git with this:

+		.callback	= dmi_io_delay_0xed_port,
+		.ident		= "HP Pavilion tx1000",
+		.matches	= {
+			DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"),
+			DMI_MATCH(DMI_BOARD_NAME, "30BF")
+		}

Find combo patch below.

	Ingo

--------------->
Index: linux-x86.q/Documentation/kernel-parameters.txt
===================================================================
--- linux-x86.q.orig/Documentation/kernel-parameters.txt
+++ linux-x86.q/Documentation/kernel-parameters.txt
@@ -785,6 +785,16 @@ and is between 256 and 4096 characters. 
 			for translation below 32 bit and if not available
 			then look in the higher range.
 
+	io_delay=	[X86-32,X86-64] I/O delay method
+		0x80
+			Standard port 0x80 based delay
+		0xed
+			Alternate port 0xed based delay (needed on some systems)
+		udelay
+			Simple two microseconds delay
+		none
+			No delay
+
 	io7=		[HW] IO7 for Marvel based alpha systems
 			See comment before marvel_specify_io7 in
 			arch/alpha/kernel/core_marvel.c.
Index: linux-x86.q/arch/x86/Kconfig.debug
===================================================================
--- linux-x86.q.orig/arch/x86/Kconfig.debug
+++ linux-x86.q/arch/x86/Kconfig.debug
@@ -112,4 +112,78 @@ config IOMMU_LEAK
 	  Add a simple leak tracer to the IOMMU code. This is useful when you
 	  are debugging a buggy device driver that leaks IOMMU mappings.
 
+#
+# IO delay types:
+#
+
+config IO_DELAY_TYPE_0X80
+	int
+	default "0"
+
+config IO_DELAY_TYPE_0XED
+	int
+	default "1"
+
+config IO_DELAY_TYPE_UDELAY
+	int
+	default "2"
+
+config IO_DELAY_TYPE_NONE
+	int
+	default "3"
+
+choice
+	prompt "IO delay type"
+	default IO_DELAY_UDELAY
+
+config IO_DELAY_0X80
+	bool "port 0x80 based port-IO delay [recommended]"
+	help
+	  This is the traditional Linux IO delay used for in/out_p.
+	  It is the most tested hence safest selection here.
+
+config IO_DELAY_0XED
+	bool "port 0xed based port-IO delay"
+	help
+	  Use port 0xed as the IO delay. This frees up port 0x80 which is
+	  often used as a hardware-debug port.
+
+config IO_DELAY_UDELAY
+	bool "udelay based port-IO delay"
+	help
+	  Use udelay(2) as the IO delay method. This provides the delay
+	  while not having any side-effect on the IO port space.
+
+config IO_DELAY_NONE
+	bool "no port-IO delay"
+	help
+	  No port-IO delay. Will break on old boxes that require port-IO
+	  delay for certain operations. Should work on most new machines.
+
+endchoice
+
+if IO_DELAY_0X80
+config DEFAULT_IO_DELAY_TYPE
+	int
+	default IO_DELAY_TYPE_0X80
+endif
+
+if IO_DELAY_0XED
+config DEFAULT_IO_DELAY_TYPE
+	int
+	default IO_DELAY_TYPE_0XED
+endif
+
+if IO_DELAY_UDELAY
+config DEFAULT_IO_DELAY_TYPE
+	int
+	default IO_DELAY_TYPE_UDELAY
+endif
+
+if IO_DELAY_NONE
+config DEFAULT_IO_DELAY_TYPE
+	int
+	default IO_DELAY_TYPE_NONE
+endif
+
 endmenu
Index: linux-x86.q/arch/x86/boot/compressed/misc_32.c
===================================================================
--- linux-x86.q.orig/arch/x86/boot/compressed/misc_32.c
+++ linux-x86.q/arch/x86/boot/compressed/misc_32.c
@@ -276,10 +276,10 @@ static void putstr(const char *s)
 	RM_SCREEN_INFO.orig_y = y;
 
 	pos = (x + cols * y) * 2;	/* Update cursor position */
-	outb_p(14, vidport);
-	outb_p(0xff & (pos >> 9), vidport+1);
-	outb_p(15, vidport);
-	outb_p(0xff & (pos >> 1), vidport+1);
+	outb(14, vidport);
+	outb(0xff & (pos >> 9), vidport+1);
+	outb(15, vidport);
+	outb(0xff & (pos >> 1), vidport+1);
 }
 
 static void* memset(void* s, int c, unsigned n)
Index: linux-x86.q/arch/x86/boot/compressed/misc_64.c
===================================================================
--- linux-x86.q.orig/arch/x86/boot/compressed/misc_64.c
+++ linux-x86.q/arch/x86/boot/compressed/misc_64.c
@@ -269,10 +269,10 @@ static void putstr(const char *s)
 	RM_SCREEN_INFO.orig_y = y;
 
 	pos = (x + cols * y) * 2;	/* Update cursor position */
-	outb_p(14, vidport);
-	outb_p(0xff & (pos >> 9), vidport+1);
-	outb_p(15, vidport);
-	outb_p(0xff & (pos >> 1), vidport+1);
+	outb(14, vidport);
+	outb(0xff & (pos >> 9), vidport+1);
+	outb(15, vidport);
+	outb(0xff & (pos >> 1), vidport+1);
 }
 
 static void* memset(void* s, int c, unsigned n)
Index: linux-x86.q/arch/x86/kernel/Makefile_32
===================================================================
--- linux-x86.q.orig/arch/x86/kernel/Makefile_32
+++ linux-x86.q/arch/x86/kernel/Makefile_32
@@ -8,7 +8,7 @@ CPPFLAGS_vmlinux.lds += -Ui386
 obj-y	:= process_32.o signal_32.o entry_32.o traps_32.o irq_32.o \
 		ptrace_32.o time_32.o ioport_32.o ldt_32.o setup_32.o i8259_32.o sys_i386_32.o \
 		pci-dma_32.o i386_ksyms_32.o i387_32.o bootflag.o e820_32.o\
-		quirks.o i8237.o topology.o alternative.o i8253.o tsc_32.o
+		quirks.o i8237.o topology.o alternative.o i8253.o tsc_32.o io_delay.o
 
 obj-$(CONFIG_STACKTRACE)	+= stacktrace.o
 obj-y				+= cpu/
Index: linux-x86.q/arch/x86/kernel/Makefile_64
===================================================================
--- linux-x86.q.orig/arch/x86/kernel/Makefile_64
+++ linux-x86.q/arch/x86/kernel/Makefile_64
@@ -11,7 +11,7 @@ obj-y	:= process_64.o signal_64.o entry_
 		x8664_ksyms_64.o i387_64.o syscall_64.o vsyscall_64.o \
 		setup64.o bootflag.o e820_64.o reboot_64.o quirks.o i8237.o \
 		pci-dma_64.o pci-nommu_64.o alternative.o hpet.o tsc_64.o bugs_64.o \
-		i8253.o
+		i8253.o io_delay.o
 
 obj-$(CONFIG_STACKTRACE)	+= stacktrace.o
 obj-y				+= cpu/
Index: linux-x86.q/arch/x86/kernel/io_delay.c
===================================================================
--- /dev/null
+++ linux-x86.q/arch/x86/kernel/io_delay.c
@@ -0,0 +1,114 @@
+/*
+ * I/O delay strategies for inb_p/outb_p
+ *
+ * Allow for a DMI based override of port 0x80, needed for certain HP laptops
+ * and possibly other systems. Also allow for the gradual elimination of
+ * outb_p/inb_p API uses.
+ */
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+#include <linux/dmi.h>
+#include <asm/io.h>
+
+int io_delay_type __read_mostly = CONFIG_DEFAULT_IO_DELAY_TYPE;
+EXPORT_SYMBOL_GPL(io_delay_type);
+
+static int __initdata io_delay_override;
+
+/*
+ * Paravirt wants native_io_delay to be a constant.
+ */
+void native_io_delay(void)
+{
+	switch (io_delay_type) {
+	default:
+	case CONFIG_IO_DELAY_TYPE_0X80:
+		asm volatile ("outb %al, $0x80");
+		break;
+	case CONFIG_IO_DELAY_TYPE_0XED:
+		asm volatile ("outb %al, $0xed");
+		break;
+	case CONFIG_IO_DELAY_TYPE_UDELAY:
+		/*
+		 * 2 usecs is an upper-bound for the outb delay but
+		 * note that udelay doesn't have the bus-level
+		 * side-effects that outb does, nor does udelay() have
+		 * precise timings during very early bootup (the delays
+		 * are shorter until calibrated):
+		 */
+		udelay(2);
+	case CONFIG_IO_DELAY_TYPE_NONE:
+		break;
+	}
+}
+EXPORT_SYMBOL(native_io_delay);
+
+static int __init dmi_io_delay_0xed_port(const struct dmi_system_id *id)
+{
+	if (io_delay_type == CONFIG_IO_DELAY_TYPE_0X80) {
+		printk(KERN_NOTICE "%s: using 0xed I/O delay port\n",
+			id->ident);
+		io_delay_type = CONFIG_IO_DELAY_TYPE_0XED;
+	}
+
+	return 0;
+}
+
+/*
+ * Quirk table for systems that misbehave (lock up, etc.) if port
+ * 0x80 is used:
+ */
+static struct dmi_system_id __initdata io_delay_0xed_port_dmi_table[] = {
+	{
+		.callback	= dmi_io_delay_0xed_port,
+		.ident		= "Compaq Presario V6000",
+		.matches	= {
+			DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"),
+			DMI_MATCH(DMI_BOARD_NAME, "30B7")
+		}
+	},
+	{
+		.callback	= dmi_io_delay_0xed_port,
+		.ident		= "HP Pavilion dv9000z",
+		.matches	= {
+			DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"),
+			DMI_MATCH(DMI_BOARD_NAME, "30B9")
+		}
+	},
+	{
+		.callback	= dmi_io_delay_0xed_port,
+		.ident		= "HP Pavilion tx1000",
+		.matches	= {
+			DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"),
+			DMI_MATCH(DMI_BOARD_NAME, "30BF")
+		}
+	},
+	{ }
+};
+
+void __init io_delay_init(void)
+{
+	if (!io_delay_override)
+		dmi_check_system(io_delay_0xed_port_dmi_table);
+}
+
+static int __init io_delay_param(char *s)
+{
+	if (!strcmp(s, "0x80"))
+		io_delay_type = CONFIG_IO_DELAY_TYPE_0X80;
+	else if (!strcmp(s, "0xed"))
+		io_delay_type = CONFIG_IO_DELAY_TYPE_0XED;
+	else if (!strcmp(s, "udelay"))
+		io_delay_type = CONFIG_IO_DELAY_TYPE_UDELAY;
+	else if (!strcmp(s, "none"))
+		io_delay_type = CONFIG_IO_DELAY_TYPE_NONE;
+	else
+		return -EINVAL;
+
+	io_delay_override = 1;
+	return 0;
+}
+
+early_param("io_delay", io_delay_param);
Index: linux-x86.q/arch/x86/kernel/setup_32.c
===================================================================
--- linux-x86.q.orig/arch/x86/kernel/setup_32.c
+++ linux-x86.q/arch/x86/kernel/setup_32.c
@@ -648,6 +648,8 @@ void __init setup_arch(char **cmdline_p)
 
 	dmi_scan_machine();
 
+	io_delay_init();;
+
 #ifdef CONFIG_X86_GENERICARCH
 	generic_apic_probe();
 #endif	
Index: linux-x86.q/arch/x86/kernel/setup_64.c
===================================================================
--- linux-x86.q.orig/arch/x86/kernel/setup_64.c
+++ linux-x86.q/arch/x86/kernel/setup_64.c
@@ -311,6 +311,8 @@ void __init setup_arch(char **cmdline_p)
 
 	dmi_scan_machine();
 
+	io_delay_init();
+
 #ifdef CONFIG_SMP
 	/* setup to use the static apicid table during kernel startup */
 	x86_cpu_to_apicid_ptr = (void *)&x86_cpu_to_apicid_init;
Index: linux-x86.q/include/asm-x86/io_32.h
===================================================================
--- linux-x86.q.orig/include/asm-x86/io_32.h
+++ linux-x86.q/include/asm-x86/io_32.h
@@ -250,10 +250,10 @@ static inline void flush_write_buffers(v
 
 #endif /* __KERNEL__ */
 
-static inline void native_io_delay(void)
-{
-	asm volatile("outb %%al,$0x80" : : : "memory");
-}
+extern void native_io_delay(void);
+
+extern int io_delay_type;
+extern void io_delay_init(void);
 
 #if defined(CONFIG_PARAVIRT)
 #include <asm/paravirt.h>
Index: linux-x86.q/include/asm-x86/io_64.h
===================================================================
--- linux-x86.q.orig/include/asm-x86/io_64.h
+++ linux-x86.q/include/asm-x86/io_64.h
@@ -35,13 +35,20 @@
   *  - Arnaldo Carvalho de Melo <acme@conectiva.com.br>
   */
 
-#define __SLOW_DOWN_IO "\noutb %%al,$0x80"
+extern void native_io_delay(void);
 
+extern int io_delay_type;
+extern void io_delay_init(void);
+
+static inline void slow_down_io(void)
+{
+	native_io_delay();
 #ifdef REALLY_SLOW_IO
-#define __FULL_SLOW_DOWN_IO __SLOW_DOWN_IO __SLOW_DOWN_IO __SLOW_DOWN_IO __SLOW_DOWN_IO
-#else
-#define __FULL_SLOW_DOWN_IO __SLOW_DOWN_IO
+	native_io_delay();
+	native_io_delay();
+	native_io_delay();
 #endif
+}
 
 /*
  * Talk about misusing macros..
@@ -50,21 +57,21 @@
 static inline void out##s(unsigned x value, unsigned short port) {
 
 #define __OUT2(s,s1,s2) \
-__asm__ __volatile__ ("out" #s " %" s1 "0,%" s2 "1"
+__asm__ __volatile__ ("out" #s " %" s1 "0,%" s2 "1" : : "a" (value), "Nd" (port))
 
 #define __OUT(s,s1,x) \
-__OUT1(s,x) __OUT2(s,s1,"w") : : "a" (value), "Nd" (port)); } \
-__OUT1(s##_p,x) __OUT2(s,s1,"w") __FULL_SLOW_DOWN_IO : : "a" (value), "Nd" (port));} \
+__OUT1(s,x) __OUT2(s,s1,"w"); } \
+__OUT1(s##_p,x) __OUT2(s,s1,"w"); slow_down_io(); }
 
 #define __IN1(s) \
 static inline RETURN_TYPE in##s(unsigned short port) { RETURN_TYPE _v;
 
 #define __IN2(s,s1,s2) \
-__asm__ __volatile__ ("in" #s " %" s2 "1,%" s1 "0"
+__asm__ __volatile__ ("in" #s " %" s2 "1,%" s1 "0" : "=a" (_v) : "Nd" (port))
 
-#define __IN(s,s1,i...) \
-__IN1(s) __IN2(s,s1,"w") : "=a" (_v) : "Nd" (port) ,##i ); return _v; } \
-__IN1(s##_p) __IN2(s,s1,"w") __FULL_SLOW_DOWN_IO : "=a" (_v) : "Nd" (port) ,##i ); return _v; } \
+#define __IN(s,s1) \
+__IN1(s) __IN2(s,s1,"w"); return _v; } \
+__IN1(s##_p) __IN2(s,s1,"w"); slow_down_io(); return _v; }
 
 #define __INS(s) \
 static inline void ins##s(unsigned short port, void * addr, unsigned long count) \
Index: linux-x86.q/kernel/sysctl.c
===================================================================
--- linux-x86.q.orig/kernel/sysctl.c
+++ linux-x86.q/kernel/sysctl.c
@@ -53,6 +53,7 @@
 #ifdef CONFIG_X86
 #include <asm/nmi.h>
 #include <asm/stacktrace.h>
+#include <asm/io.h>
 #endif
 
 static int deprecated_sysctl_warning(struct __sysctl_args *args);
@@ -683,6 +684,14 @@ static struct ctl_table kern_table[] = {
 		.mode		= 0644,
 		.proc_handler	= &proc_dointvec,
 	},
+	{
+		.ctl_name	= CTL_UNNUMBERED,
+		.procname	= "io_delay_type",
+		.data		= &io_delay_type,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec,
+	},
 #endif
 #if defined(CONFIG_MMU)
 	{

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
  2008-01-02 10:04                   ` Ingo Molnar
@ 2008-01-02 13:11                     ` David P. Reed
  2008-01-02 13:21                       ` Ingo Molnar
  0 siblings, 1 reply; 61+ messages in thread
From: David P. Reed @ 2008-01-02 13:11 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Alan Cox, H. Peter Anvin, Rene Herman, Paul Rolland,
	Pavel Machek, Thomas Gleixner, linux-kernel, Ingo Molnar, rol

FYI - another quirky Quanta motherboard from HP, with DMI readings 
reported to me.

-------- Original Message --------
Date: 	Wed, 2 Jan 2008 16:23:27 +1030
From: 	Joel Stanley <joel.stanley@adelaide.edu.au>
To: 	David P. Reed <dpreed@reed.com>
Subject: 	Re: [PATCH] Option to disable AMD C1E (allows dynticks to work)



On Dec 30, 2007 1:13 AM, David P. Reed <dpreed@reed.com> wrote:
> I have also attached a c program that only touches port 80.  Compile it
> for 32-bit mode (see comment), run it as root, and after two or three
> runs, it will hang a system that has the port 80 bug.

Using port80.c, I could hard lock a HP Pavilion tx1000 laptop on the
first go. This was with ubuntu hardy's stock kernel (a 2.6.24-rc)

> dmidecode -s baseboard-manufacturer
> dmidecode -s baseboard-product-name

Quanta
30BF

Tonight, I will try compiling a kernel with these values added to your patch.

Some history, feel free to ignore if it's not relevant: ubuntu
feisty's 2.6.22 based kernel worked fine, irc. We were having issues
with sound, so tried fedora8's .23 based kernel, but this would
sporadically hard lock. Ubuntu hardy's 2.6.24 appeared fine, for the 2
hours or so I used it last night, until using the port80.c program,
obviously.

Cheers,

Joel



^ permalink raw reply	[flat|nested] 61+ messages in thread

end of thread, other threads:[~2008-01-18 14:09 UTC | newest]

Thread overview: 61+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <fa.u5p8NBl8IjcycTVVtf0K+YtqNQc@ifi.uio.no>
     [not found] ` <fa.NOJkdyuk0c8CAqzZcG+pF1TzhJM@ifi.uio.no>
     [not found]   ` <fa.YLAHN7jSUo9phsICUHnxilN7/lk@ifi.uio.no>
     [not found]     ` <fa.SvgVgdNA9oz4F+tQ9MB2VRwr8ck@ifi.uio.no>
     [not found]       ` <fa.By1MDYK0MY/fwkCWWrAiQCxl5KM@ifi.uio.no>
     [not found]         ` <fa.97XrGLIGlvAy4P/TB5vHHrfBrIw@ifi.uio.no>
2008-01-10  0:37           ` [linux-kernel] Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override Robert Hancock
2008-01-10  0:44             ` Rene Herman
2008-01-10 14:41               ` David P. Reed
     [not found] <9BdU5-1YW-9@gated-at.bofh.it>
     [not found] ` <9BeZN-3Gf-5@gated-at.bofh.it>
     [not found]   ` <9BnTB-1As-31@gated-at.bofh.it>
     [not found]     ` <9BrX4-8go-1@gated-at.bofh.it>
     [not found]       ` <9BuBG-4eR-51@gated-at.bofh.it>
     [not found]         ` <9BvRd-6aL-71@gated-at.bofh.it>
     [not found]           ` <9GRQW-1DX-13@gated-at.bofh.it>
     [not found]             ` <9GSah-23W-1@gated-at.bofh.it>
     [not found]               ` <9GSDy-2GD-23@gated-at.bofh.it>
     [not found]                 ` <9GTpK-40d-15@gated-at.bofh.it>
     [not found]                   ` <9GUvy-5H2-11@gated-at.bofh.it>
     [not found]                     ` <9GVKU-7SS-25@gated-at.bofh.it>
2008-01-07 19:38                       ` Bodo Eggert
2008-01-07 19:46                         ` H. Peter Anvin
2008-01-07 22:02                           ` Bodo Eggert
2008-01-07 22:10                             ` H. Peter Anvin
2008-01-07 22:27                               ` Bodo Eggert
2008-01-07 22:59                                 ` Rene Herman
2008-01-07 23:24                                   ` H. Peter Anvin
2008-01-07 23:26                                     ` Rene Herman
2008-01-08  0:10                                       ` [linux-kernel] " David P. Reed
2008-01-08  0:13                                         ` H. Peter Anvin
2008-01-08  1:38                                           ` David P. Reed
2008-01-08 17:10                                             ` Ondrej Zary
2008-01-08 17:24                                               ` David P. Reed
2008-01-08 17:38                                                 ` Ondrej Zary
2008-01-08 18:44                                                   ` David P. Reed
2008-01-08 18:51                                                     ` Alan Cox
2008-01-08 19:15                                                       ` David P. Reed
2008-01-08 19:23                                                         ` Alan Cox
2008-01-08 19:51                                                           ` David P. Reed
2008-01-09  2:52                                                         ` Zachary Amsden
2008-01-09  5:19                                                           ` H. Peter Anvin
2008-01-09 21:53                                                             ` Zachary Amsden
2008-01-09 22:22                                                               ` David P. Reed
2008-01-11  1:36                                                                 ` Zachary Amsden
2008-01-11  3:05                                                                   ` Rene Herman
2008-01-11 14:35                                                                     ` David P. Reed
2008-01-11 14:37                                                                       ` Alan Cox
2008-01-11 15:07                                                                         ` David P. Reed
2008-01-11 17:54                                                                           ` H. Peter Anvin
2008-01-11 14:49                                                                       ` Rene Herman
2008-01-14 21:57                                                                       ` David Woodhouse
2008-01-14 22:22                                                                         ` David P. Reed
2008-01-16 14:36                                                                           ` David Newall
2008-01-16 14:55                                                                             ` Alan Cox
2008-01-16 19:15                                                                               ` David Newall
2008-01-16 20:08                                                                                 ` Alan Cox
2008-01-17  6:25                                                                                   ` David Newall
2008-01-17 12:02                                                                                     ` Alan Cox
2008-01-17 13:36                                                                                       ` David Newall
2008-01-17 13:55                                                                                         ` Rene Herman
2008-01-17 21:58                                                                                           ` David Newall
2008-01-17 22:13                                                                                             ` Rene Herman
2008-01-18 13:37                                                                                               ` David Newall
2008-01-18 14:05                                                                                                 ` Rene Herman
2008-01-17 15:51                                                                                         ` Alan Cox
2008-01-09  5:30                                                           ` Christer Weinigel
2008-01-09 14:42                                                             ` David P. Reed
2008-01-09 15:27                                                             ` Rene Herman
2008-01-09 18:17                                                               ` Zachary Amsden
2008-01-09 18:18                                                                 ` H. Peter Anvin
2008-01-09 20:26                                                                   ` Christer Weinigel
2008-01-09 21:59                                                                     ` H. Peter Anvin
2008-01-09 18:22                                                                 ` Adrian Bunk
2008-01-09 18:27                                                                   ` H. Peter Anvin
2008-01-08 19:25                                                     ` Christer Weinigel
2008-01-08 20:28                                                       ` David P. Reed
2008-01-08 21:43                                                         ` Christer Weinigel
2008-01-08 22:24                                                           ` David P. Reed
2008-01-08 18:51                                                   ` Bodo Eggert
2008-01-08 19:13                                                     ` Ondrej Zary
2008-01-08 12:51                                       ` Bodo Eggert
2008-01-08 13:07                                         ` [linux-kernel] " David P. Reed
2008-01-08 14:37                                           ` Alan Cox
2008-01-07 23:57                                     ` David P. Reed
2008-01-08  1:58                                       ` Alan Cox
2007-12-17 13:02 Rene Herman
2007-12-17 17:14 ` H. Peter Anvin
2007-12-17 19:43   ` David P. Reed
2007-12-17 21:25     ` Alan Cox
2008-01-01 15:59       ` David P. Reed
2008-01-01 16:15         ` Alan Cox
2008-01-01 16:43           ` Ingo Molnar
2008-01-01 17:32             ` Alan Cox
2008-01-01 18:45               ` Ingo Molnar
2008-01-01 21:07                 ` Alan Cox
2008-01-02 10:04                   ` Ingo Molnar
2008-01-02 13:11                     ` [linux-kernel] " David P. Reed
2008-01-02 13:21                       ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).