lkml.org 
[lkml]   [2008]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] resource/x86: add sticky resource type


On Thu, 28 Aug 2008, Ingo Molnar wrote:
>
> Does anyone have any suggestions of how to improve this some more? (or
> do it differently)

As far as I can see, THIS IS TOTALLY BROKEN.

There's a reason why we add the broken resources LATE. There's a reason we
_have_ to add them late.

Trying to come up with these braindamaged schemes to avoid doing it right
is wrong. Don't do it.

The reason? Those bogus resources that the BIOS reports are simply NOT
TRUSTWORTHY. They may actually be in all the wrong places, including
covering a resource half-way, or crossing two real resources.

Yes, it's rare. But it happens. Which is why we should not do these broken
things that _incorrectly_ assume that the BIOS resources will only ever be
totally contained within a BAR, or will totally contain one. Think about
the partial overlap case.

Guys, until you learn that the BIOS resources are _crap_ and at most
random guesses, you shouldn't touch this code! And it has nothing to do
with writing "clean" code, or making things "simple", because quite
frankly, things simply ARE NOT simple!

The fact is, the only reliable way to handle these things has _always_
been to ask the hardware first. Add the broken resources from ACPI and
other BIOS tables _later_. If they conflict, it is the ACPI/BIOS tables
that should be removed.

Why do I have to tell this to people over and over again?

Linus


\
 
 \ /
  Last update: 2008-08-28 19:23    [W:0.033 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site