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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Newall
Date: Wednesday, December 12, 2007 - 3:18 pm

Alan Cox wrote:

The _p variants are a universal fixture, defined as ending with a pause, 
but without specifying the duration.  (The duration is architecture 
specific, mostly zero.)  It really isn't a form that should be used in 
generic code.


Yes, it's now clear that all of this is so.  Regrettably, it's used in 
dozens of drivers, most having nothing to do with an ISA/LPC bus.

If it really is specific to the ISA architecture, then it should only be 
used in architecture specific code.

I think the solution is to remove it.  Replace all _p calls with the 
non-_p variant, and add an explicit udelay.  Udelay can initially be set 
conservatively until it's been properly calibrated, allowing it to be 
used during early boot.  The good news is that it's only used in a few 
dozen drivers, so that actually might be doable.  And then, who knows, 
maybe Microsoft might have to scratch their corporate heads, trying to 
find out how to compete with a suddenly much faster Linux! :-p
--
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 ..., Dr. David Alan Gilbert, (Sun Dec 9, 6:41 am)
Re: RFC: outb 0x80 in inb_p, outb_p harmful on some modern ..., linux-os (Dick Johnson), (Tue Dec 11, 8:41 am)
Re: RFC: outb 0x80 in inb_p, outb_p harmful on some modern ..., linux-os (Dick Johnson), (Tue Dec 11, 1:27 pm)
Re: RFC: outb 0x80 in inb_p, outb_p harmful on some modern ..., linux-os (Dick Johnson), (Wed Dec 12, 6:11 am)
More info on port 80 symptoms on MCP51 machine., David P. Reed, (Wed Dec 12, 1:07 pm)
Re: More info on port 80 symptoms on MCP51 machine., Rene Herman, (Wed Dec 12, 1:26 pm)
Re: Attitude problems., linux-os (Dick Johnson), (Wed Dec 12, 1:31 pm)
Re: More info on port 80 symptoms on MCP51 machine., David P. Reed, (Wed Dec 12, 1:37 pm)
Re: More info on port 80 symptoms on MCP51 machine., H. Peter Anvin, (Wed Dec 12, 2:05 pm)
Re: RFC: outb 0x80 in inb_p, outb_p harmful on some modern ..., David Newall, (Wed Dec 12, 3:18 pm)
Re: Attitude problems., linux-os (Dick Johnson), (Fri Dec 14, 9:01 am)
Re: More info on port 80 symptoms on MCP51 machine., Chuck Ebbert, (Fri Dec 14, 3:05 pm)
Re: More info on port 80 symptoms on MCP51 machine., Rene Herman, (Sat Dec 15, 12:22 am)
RE: More info on port 80 symptoms on MCP51 machine., Allen Martin, (Sat Dec 15, 3:34 pm)
Re: More info on port 80 symptoms on MCP51 machine., H. Peter Anvin, (Sat Dec 15, 3:46 pm)