mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: Yinghai Lu <yhlu.kernel@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	Jesse Barnes <jbarnes@virtuousgeek.org>
Subject: Re: [PATCH] resource/x86: add sticky resource type
Date: Thu, 28 Aug 2008 10:20:12 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.1.10.0808281015440.3300@nehalem.linux-foundation.org> (raw)
In-Reply-To: <20080828082119.GN21875@elte.hu>



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

  reply	other threads:[~2008-08-28 17:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-28  1:56 Yinghai Lu
2008-08-28  8:21 ` Ingo Molnar
2008-08-28 17:20   ` Linus Torvalds [this message]
2008-08-28 20:17     ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.1.10.0808281015440.3300@nehalem.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=yhlu.kernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®