Messages in this thread | | | Date | Sun, 30 Dec 2007 15:14:16 +0100 | From | Rene Herman <> | Subject | Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override |
| |
On 30-12-07 10:30, Linus Torvalds wrote:
> On Sun, 30 Dec 2007, Rene Herman wrote:
>> This fixes "hwclock" triggered boottime hangs for a few HP/Compaq laptops >> and might as such be applicable to 2.6.24 still. > > It's not a regression as far as I can see (ie we've always done that port > 80 access for slow-down), and quite frankly, I think the code is horribly > ugly.
It is indeed not a regression. Submitted it as a stop-gap measure for those specific afflicted machines but I guess they'll mostly be able to google up the problem and patch by now as well..
> Using a DMI quirk for something like this is just not maintainable. Are we > going to live with doing new quirks forever? I'd rather just remove the > slowdown entirely (obviously that is not for 2.6.24 either, though!), and > drivers that then are shown to really need it could use their *own* ports.
And yes, "elegant" it is neither. It's a bit of a pesky problem though. Port 0x80 is a decidedly non-random port selection in so far that it's just about the only available port with guaranteed (in a PC sense) effects -- various chipsets make specific efforts to forward port 0x80 writes onto ISA due to its use as a POST port by the PC BIOS meaning the outb outside its bus-level effects also has fairly well defined timing characteristics. In practice, a udelay(2) is going to satisfy the delay property though -- but doesn't do anything for the other things the outb() does.
The legacy PIT, PIC and DMA and KB controllers have been mentioned in this and previous incarnations of this same thread as hardware that in some implementations need the outb to function properly but ofcourse, no _sane_ implementations do. With an arch that purports to support just about anything though there's some fairly justified fear, uncertainty, doubt that the ones to break aren't going to be found and reported quickly/easily. In itself, that could mean it's also not something to be overly worried about, but still not nice.
With the various races in (legacy) drivers additionally an early suggestion by Andi Kleen to leave the outb in place for a DMI year < X (or no DMI available) and just do nothing for > X might in fact be justified.
Rene.
| |