From: Andrew Morton <akpm@linux-foundation.org>
To: Yinghai Lu <Yinghai.Lu@Sun.COM>
Cc: mingo@elte.hu, hpa@zytor.com, tglx@linutronix.de,
jeff@garzik.org, greg@kroah.com, hancockr@shaw.ca, ak@suse.de,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] x86: MMCONF enable MCFG early
Date: Fri, 18 Jan 2008 13:58:30 -0800 [thread overview]
Message-ID: <20080118135830.7a04a806.akpm@linux-foundation.org> (raw)
In-Reply-To: <200801161409.02591.yinghai.lu@sun.com>
On Wed, 16 Jan 2008 14:09:02 -0800
Yinghai Lu <Yinghai.Lu@Sun.COM> wrote:
> [PATCH] x86: MMCONF enable MCFG early
>
> patch
> x86: validate against ACPI motherboard resources
>
> changed the mmconf init sequence, and init MMCONF late in acpi_init.
>
> here change it back to old sequence
> 1. check hostbridge in early
> 2. check MCFG with e820 in early
> 3. if all fail, will check MCFg with acpi _CRS in acpi_init
>
> So we can make MCONF working again when acpi=off is set if hostbridge support that.
>
> ...
>
> + printk(KERN_NOTICE "PCI: MCFG configuration %d: base %lx "
> "segment %hu buses %u - %u\n",
> i, (unsigned long)cfg->address, cfg->pci_segment,
> (unsigned int)cfg->start_bus_number,
> (unsigned int)cfg->end_bus_number);
> +
> + if (!early)
> if (is_acpi_reserved(cfg->address, cfg->address + size - 1)) {
> printk(KERN_NOTICE "PCI: MCFG area at %Lx reserved "
> "in ACPI motherboard resources\n",
> cfg->address);
> - } else {
> + valid = 1;
> + }
grumble. Please don't mess up the kernel source like that.
> -void __init pci_mmcfg_late_init(void)
> +void __init __pci_mmcfg_init(int type, int early)
> {
> - int known_bridge = 0;
> -
> /* MMCONFIG disabled */
> if ((pci_probe & PCI_PROBE_MMCONF) == 0)
> return;
>
> /* MMCONFIG already enabled */
> + if (!early)
> if (!(pci_probe & PCI_PROBE_MASK & ~PCI_PROBE_MMCONF))
> return;
>
and that. Do it properly.
--- a/arch/x86/pci/mmconfig-shared.c~x86-mmconf-enable-mcfg-early-cleanup
+++ a/arch/x86/pci/mmconfig-shared.c
@@ -308,8 +308,8 @@ static void __init pci_mmcfg_reject_brok
(unsigned int)cfg->start_bus_number,
(unsigned int)cfg->end_bus_number);
- if (!early)
- if (is_acpi_reserved(cfg->address, cfg->address + size - 1)) {
+ if (!early &&
+ is_acpi_reserved(cfg->address, cfg->address + size - 1)) {
printk(KERN_NOTICE "PCI: MCFG area at %Lx reserved "
"in ACPI motherboard resources\n",
cfg->address);
@@ -357,8 +357,7 @@ void __init __pci_mmcfg_init(int type, i
return;
/* MMCONFIG already enabled */
- if (!early)
- if (!(pci_probe & PCI_PROBE_MASK & ~PCI_PROBE_MMCONF))
+ if (!early && !(pci_probe & PCI_PROBE_MASK & ~PCI_PROBE_MMCONF))
return;
/* for late to exit */
_
prev parent reply other threads:[~2008-01-18 21:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200801161405.17889.yinghai.lu@sun.com>
2008-01-16 22:08 ` [PATCH 1/2] x86: clear pci_mmcfg_virt when mmcfg get rejected Yinghai Lu
[not found] ` <200801161406.38946.yinghai.lu@sun.com>
2008-01-16 22:09 ` [PATCH 2/2] x86: MMCONF enable MCFG early Yinghai Lu
2008-01-17 0:26 ` Yinghai Lu
2008-01-18 10:00 ` Ingo Molnar
2008-01-18 10:01 ` Ingo Molnar
2008-01-18 21:46 ` Yinghai Lu
2008-01-18 21:58 ` Andrew Morton [this message]
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=20080118135830.7a04a806.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=Yinghai.Lu@Sun.COM \
--cc=ak@suse.de \
--cc=greg@kroah.com \
--cc=hancockr@shaw.ca \
--cc=hpa@zytor.com \
--cc=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.