From: Robert Hancock <hancockr@shaw.ca>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Arjan van de Ven <arjan@infradead.org>, Greg KH <greg@kroah.com>,
Jesse Barnes <jbarnes@virtuousgeek.org>,
akpm@linux-foundation.org, ak@suse.de, rajesh.shah@intel.com,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: pci-disable-decode-of-io-memory-during-bar-sizing.patch
Date: Tue, 30 Oct 2007 18:23:54 -0600 [thread overview]
Message-ID: <4727CB1A.7040607@shaw.ca> (raw)
In-Reply-To: <alpine.LFD.0.999.0710301653330.30120@woody.linux-foundation.org>
Linus Torvalds wrote:
>
> 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.
My point was, it's not inherently necessary in order to use MMCONFIG.
I'm not saying the checks (unreachable_devices and
pci_mmcfg_check_hostbridge) aren't useful or needed with many real
machines. However, in the event that type1 access isn't available we
just skip all those checks because we have no other option. It would
indeed be a pretty broken spec if there was no way to bootstrap with it
even under ideal conditions..
>
> 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.
I can't really disagree that MMCONFIG doesn't have great advantages for
most devices (though it likely is faster on a lot of platforms, which
may be significant if the device does lots of config space accesses). So
for the moment, avoiding using it except where necessary will likely
work out (except if some system does indeed puke on mixing type1 and
MMCONFIG).
However, what Microsoft is doing with Vista may eventually make a
difference in the future. Many hardware vendors seem to use the testing
strategy of "test with latest Windows version. Works OK? Ship it." If
Vista decides that MMCONFIG is good to use all the time, then type1
access support is likely going to a) end up less tested and b) probably
deleted entirely in time. We've seen it before - it used to be that not
using ACPI was the safe option on most hardware with Linux. Now you
pretty much have to use it because the manufacturers only test with it
enabled. I've seen at least one board where the interrupt routing was
completely broken with ACPI off, because they obviously only tested in
Windows..
next prev parent reply other threads:[~2007-10-31 0:23 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200708151919.l7FJJfUE010966@imap1.linux-foundation.org>
2007-10-25 23:20 ` - mmconfig-validate-against-acpi-motherboard-resources.patch removed from -mm tree Robert Hancock
2007-10-25 23:22 ` Jesse Barnes
2007-10-26 2:54 ` Greg KH
2007-10-26 5:03 ` Robert Hancock
2007-10-26 5:27 ` Greg KH
2007-10-26 16:58 ` Jesse Barnes
2007-10-26 16:59 ` pci-disable-decode-of-io-memory-during-bar-sizing.patch Jesse Barnes
2007-10-27 2:41 ` pci-disable-decode-of-io-memory-during-bar-sizing.patch Greg KH
2007-10-29 23:52 ` pci-disable-decode-of-io-memory-during-bar-sizing.patch Robert Hancock
2007-10-30 15:15 ` pci-disable-decode-of-io-memory-during-bar-sizing.patch Linus Torvalds
2007-10-30 16:47 ` pci-disable-decode-of-io-memory-during-bar-sizing.patch Arjan van de Ven
2007-10-30 17:07 ` pci-disable-decode-of-io-memory-during-bar-sizing.patch Linus Torvalds
2007-10-30 17:28 ` pci-disable-decode-of-io-memory-during-bar-sizing.patch Arjan van de Ven
2007-10-30 17:43 ` pci-disable-decode-of-io-memory-during-bar-sizing.patch Linus Torvalds
2007-11-01 8:31 ` pci-disable-decode-of-io-memory-during-bar-sizing.patch Martin Mares
2007-11-01 14:08 ` pci-disable-decode-of-io-memory-during-bar-sizing.patch Arjan van de Ven
2007-11-08 13:50 ` pci-disable-decode-of-io-memory-during-bar-sizing.patch Martin Mares
2007-10-30 22:04 ` pci-disable-decode-of-io-memory-during-bar-sizing.patch Jesse Barnes
2007-10-30 22:22 ` pci-disable-decode-of-io-memory-during-bar-sizing.patch Linus Torvalds
2007-10-30 22:31 ` pci-disable-decode-of-io-memory-during-bar-sizing.patch Jesse Barnes
2007-10-30 22:44 ` pci-disable-decode-of-io-memory-during-bar-sizing.patch David Miller
2007-10-30 22:48 ` pci-disable-decode-of-io-memory-during-bar-sizing.patch Linus Torvalds
2007-10-30 22:38 ` pci-disable-decode-of-io-memory-during-bar-sizing.patch Linus Torvalds
2007-10-30 22:39 ` pci-disable-decode-of-io-memory-during-bar-sizing.patch Jesse Barnes
2007-10-30 23:30 ` pci-disable-decode-of-io-memory-during-bar-sizing.patch Andi Kleen
2007-10-30 23:41 ` pci-disable-decode-of-io-memory-during-bar-sizing.patch Robert Hancock
2007-10-30 23:52 ` pci-disable-decode-of-io-memory-during-bar-sizing.patch Arjan van de Ven
2007-10-31 0:02 ` pci-disable-decode-of-io-memory-during-bar-sizing.patch Linus Torvalds
2007-10-30 23:59 ` pci-disable-decode-of-io-memory-during-bar-sizing.patch Linus Torvalds
2007-10-31 0:23 ` Robert Hancock [this message]
2007-10-31 1:30 ` pci-disable-decode-of-io-memory-during-bar-sizing.patch Jesse Barnes
2007-10-30 18:50 ` pci-disable-decode-of-io-memory-during-bar-sizing.patch Andi Kleen
2007-10-30 19:06 ` pci-disable-decode-of-io-memory-during-bar-sizing.patch Linus Torvalds
2007-10-30 19:37 ` pci-disable-decode-of-io-memory-during-bar-sizing.patch Andi Kleen
2007-10-30 21:41 ` pci-disable-decode-of-io-memory-during-bar-sizing.patch David Miller
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=4727CB1A.7040607@shaw.ca \
--to=hancockr@shaw.ca \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=arjan@infradead.org \
--cc=greg@kroah.com \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rajesh.shah@intel.com \
--cc=torvalds@linux-foundation.org \
/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