[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.0.999.0710301653330.30120@woody.linux-foundation.org>
Date: Tue, 30 Oct 2007 16:59:45 -0700 (PDT)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Robert Hancock <hancockr@...w.ca>
cc: Arjan van de Ven <arjan@...radead.org>, Greg KH <greg@...ah.com>,
Jesse Barnes <jbarnes@...tuousgeek.org>,
akpm@...ux-foundation.org, ak@...e.de, rajesh.shah@...el.com,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: pci-disable-decode-of-io-memory-during-bar-sizing.patch
On Tue, 30 Oct 2007, Robert Hancock wrote:
> >
> > You have to, anyway. Even now the MMCONFIG stuff uses CONF1 cycles for
> > startup.
>
> If it does, it's not by necessity. As soon as you read the table location out
> of the ACPI tables you can start using it, and that shouldn't require any
> config space accesses.
Don't be silly. Exactly _BECAUSE_ we cannot trust the firmware, we have to
use conf1 (which we can trust) to verify it and/or fix things up.
Also, there are several devices that don't show up in the MMCFG things, or
just otherwise get it wrong.
So just take a look at arch/x86/pci/mmconfig-shared.c and look for
"conf1".
Really. Damn, I'm nervous taking any MMCFG patches that has you as an
author, if you aren't even aware of these kinds of fundamnetal issues. You
probably read the standards about how things are "supposed" to work, and
then just believed them?
Rule #1 in kernel programming: don't *ever* think that things actually
work the way they are documented to work. The documentation is a starting
point, nothing else.
And please be defensive in programming. We *know* conf1 cycles work. The
hardware has been extensively tested, and there are no firmware
interactions. There is *zero* reasons to use MMCONF cycles for normal
devices. Ergo: switching over to MMCONF when not needed is stupid and
fragile.
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists