login
Header Space

 
 

Re: RFC: outb 0x80 in inb_p, outb_p harmful on some modern AMD64 with MCP51 laptops

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Paul Rolland <rol@...>
Cc: David Newall <david@...>, H. Peter Anvin <hpa@...>, Krzysztof Halasa <khc@...>, Pavel Machek <pavel@...>, Andi Kleen <andi@...>, Alan Cox <alan@...>, David P. Reed <dpreed@...>, <linux-kernel@...>, Thomas Gleixner <tglx@...>, Ingo Molnar <mingo@...>, <rol@...>
Date: Tuesday, December 11, 2007 - 5:50 am

On 11-12-07 08:40, Paul Rolland wrote:


The delay is completely and fully specified in terms of the ISA/LPC clock 
which certainly for anything modern means a fixed, unchanging value 
(something very close to 1 us) and even on older PCs that allow some 
tweaking just means a delay synced to the actual bus clock which is what the 
_p variants should normally want to accomplish.

Yes, as far as I'm aware, an inb() means the same delay but clobbers 
register al meaning you need a bloating save/restore sequence around it.


See? Moreover, this also only makes sense if there's in fact something 
responding to reads at 0x80 and with port 0x80 being a well-known legacy PC 
port, a POST monitor would be just about that and writing to _that_ would 
seem unlikely to have any ill effects other than turning your POST board LED 
display into a christmas tree. The problem more likely is some piece of 
hardware getting upset at LPC bus aborts and your suggestion wouldn't fix that.

In earlier incarnations of this thread it's been reported that various 
implementations of the legacy PC timer, DMA controller and PIC needed the 
delay but just replacing the outb with a udelay(1) would seem very likely to 
have the desired effect also for those.

The only problem with _that_ is that you need a calibrated timing loop first 
which means not-very-early boot (ie, not while you try to program the timer 
to calibrate the loop for example). Pavel Machek already posted a patch, 
although with an overly pessimistic delay value.

The problem here is with an x86-64 machine that very likely does not need 
any delay at all in fact. One thing to do would be to make _any_ delay 
dependent on 32-bit but given that 64-bit machines can run 32-bit kernels 
this doesn't fix things fully, although it probably does in practice.

Keying of DMI for any delay could be possible. But if the simple udelay(1) 
just works, all the better.

Rene.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: RFC: outb 0x80 in inb_p, outb_p harmful on some modern A..., Rene Herman, (Tue Dec 11, 5:50 am)
Re: RFC: outb 0x80 in inb_p, outb_p harmful on some modern A..., linux-os (Dick Johnson), (Tue Dec 11, 11:41 am)
More info on port 80 symptoms on MCP51 machine., David P. Reed, (Wed Dec 12, 4:07 pm)
Re: More info on port 80 symptoms on MCP51 machine., Rene Herman, (Wed Dec 12, 4:26 pm)
Re: More info on port 80 symptoms on MCP51 machine., Rene Herman, (Wed Dec 12, 4:58 pm)
Re: More info on port 80 symptoms on MCP51 machine., H. Peter Anvin, (Wed Dec 12, 5:05 pm)
Re: More info on port 80 symptoms on MCP51 machine., Chuck Ebbert, (Fri Dec 14, 6:05 pm)
Re: More info on port 80 symptoms on MCP51 machine., Rene Herman, (Sat Dec 15, 3:22 am)
Re: More info on port 80 symptoms on MCP51 machine., H. Peter Anvin, (Wed Dec 12, 5:12 pm)
RE: More info on port 80 symptoms on MCP51 machine., Allen Martin, (Sat Dec 15, 6:34 pm)
Re: More info on port 80 symptoms on MCP51 machine., H. Peter Anvin, (Sat Dec 15, 6:46 pm)
Re: More info on port 80 symptoms on MCP51 machine., David P. Reed, (Wed Dec 12, 4:37 pm)
Re: RFC: outb 0x80 in inb_p, outb_p harmful on some modern A..., linux-os (Dick Johnson), (Tue Dec 11, 4:27 pm)
Re: RFC: outb 0x80 in inb_p, outb_p harmful on some modern A..., linux-os (Dick Johnson), (Wed Dec 12, 9:11 am)
Attitude problems., David P. Reed, (Wed Dec 12, 3:42 pm)
Re: Attitude problems., linux-os (Dick Johnson), (Wed Dec 12, 4:31 pm)
Re: Attitude problems., linux-os (Dick Johnson), (Fri Dec 14, 12:01 pm)
Re: RFC: outb 0x80 in inb_p, outb_p harmful on some modern A..., Dr. David Alan Gilbert, (Sun Dec 9, 9:41 am)
Re: RFC: outb 0x80 in inb_p, outb_p harmful on some modern A..., Lennart Sorensen, (Tue Dec 11, 11:14 am)
speck-geostationary