mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Len Brown <lenb@kernel.org>
To: x86@kernel.org, sfi-devel@simplefirmware.org,
	linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org
Cc: Feng Tang <feng.tang@intel.com>, Len Brown <len.brown@intel.com>,
	Jesse Barnes <jbarnes@virtuousgeek.org>
Subject: [PATCH 11/11] SFI: Hook PCI MMCONFIG
Date: Fri, 14 Aug 2009 16:38:15 -0400	[thread overview]
Message-ID: <dd0954bc5bbb20ca31bef49c656819a5c8085a0b.1250281826.git.len.brown@intel.com> (raw)
In-Reply-To: <1250282295-25216-1-git-send-email-lenb@kernel.org>
In-Reply-To: <0763223ab0ef5c0016b7a179c1acccaabbefea02.1250281826.git.len.brown@intel.com>

From: Feng Tang <feng.tang@intel.com>

First check ACPI, and if that fails, ask SFI to find the MCFG.

Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 arch/x86/Kconfig               |    2 +-
 arch/x86/pci/mmconfig-shared.c |    6 ++++--
 arch/x86/pci/mmconfig_32.c     |    2 +-
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index d8ba424..4c92c91 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1880,7 +1880,7 @@ config PCI_DIRECT
 
 config PCI_MMCONFIG
 	def_bool y
-	depends on X86_32 && PCI && ACPI && (PCI_GOMMCONFIG || PCI_GOANY)
+	depends on X86_32 && PCI && (ACPI || SFI) && (PCI_GOMMCONFIG || PCI_GOANY)
 
 config PCI_OLPC
 	def_bool y
diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c
index b707a01..602c172 100644
--- a/arch/x86/pci/mmconfig-shared.c
+++ b/arch/x86/pci/mmconfig-shared.c
@@ -13,10 +13,12 @@
 #include <linux/pci.h>
 #include <linux/init.h>
 #include <linux/acpi.h>
+#include <linux/sfi_acpi.h>
 #include <linux/bitmap.h>
 #include <linux/sort.h>
 #include <asm/e820.h>
 #include <asm/pci_x86.h>
+#include <asm/acpi.h>
 
 #define PREFIX "PCI: "
 
@@ -493,7 +495,7 @@ static void __init pci_mmcfg_reject_broken(int early)
 		       (unsigned int)cfg->start_bus_number,
 		       (unsigned int)cfg->end_bus_number);
 
-		if (!early)
+		if (!early && !acpi_disabled)
 			valid = is_mmconf_reserved(is_acpi_reserved, addr, size, i, cfg, 0);
 
 		if (valid)
@@ -608,7 +610,7 @@ static void __init __pci_mmcfg_init(int early)
 	}
 
 	if (!known_bridge)
-		acpi_table_parse(ACPI_SIG_MCFG, pci_parse_mcfg);
+		acpi_sfi_table_parse(ACPI_SIG_MCFG, pci_parse_mcfg);
 
 	pci_mmcfg_reject_broken(early);
 
diff --git a/arch/x86/pci/mmconfig_32.c b/arch/x86/pci/mmconfig_32.c
index 8b2d561..f10a7e9 100644
--- a/arch/x86/pci/mmconfig_32.c
+++ b/arch/x86/pci/mmconfig_32.c
@@ -11,9 +11,9 @@
 
 #include <linux/pci.h>
 #include <linux/init.h>
-#include <linux/acpi.h>
 #include <asm/e820.h>
 #include <asm/pci_x86.h>
+#include <acpi/acpi.h>
 
 /* Assume systems with more busses have correct MCFG */
 #define mmcfg_virt_addr ((void __iomem *) fix_to_virt(FIX_PCIE_MCFG))
-- 
1.6.0.6


  parent reply	other threads:[~2009-08-14 21:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-14 20:38 [PATCH 00/11] SFI: Simple Firmware Interface - v3 Len Brown
2009-08-14 20:38 ` [PATCH 01/11] ACPI: Move definition of PREFIX from acpi_bus.h to internal..h Len Brown
2009-08-14 20:38   ` [PATCH 02/11] ACPI, PCI: Change PREFIX to "PCI" from "ACPI" in mmconfig-shared.c Len Brown
2009-08-14 20:38   ` [PATCH 03/11] ACPI: check acpi_disabled in acpi_table_parse() and acpi_table_parse_entries() Len Brown
2009-08-14 20:38   ` [PATCH 04/11] ACPI: Handle CONFIG_ACPI=n better from linux/acpi.h Len Brown
2009-08-14 20:38   ` [PATCH 05/11] ACPI, x86: expose some IO-APIC routines when CONFIG_ACPI=n Len Brown
2009-08-14 20:38   ` [PATCH 06/11] SFI: Simple Firmware Interface - MAINTAINERS, Kconfig Len Brown
2009-08-14 20:38   ` [PATCH 07/11] SFI: create linux/sfi.h Len Brown
2009-08-14 20:38   ` [PATCH 08/11] SFI: add platform-independent core support Len Brown
2009-08-14 20:38   ` [PATCH 09/11] SFI: add capability to parse ACPI tables Len Brown
2009-08-14 20:38   ` [PATCH 10/11] x86: add arch-specific SFI support Len Brown
2009-08-14 20:38   ` Len Brown [this message]
2009-08-17 10:06 ` [PATCH 00/11] SFI: Simple Firmware Interface - v3 Ingo Molnar
2009-08-29  0:14   ` Len Brown
2009-08-29  7:34     ` 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=dd0954bc5bbb20ca31bef49c656819a5c8085a0b.1250281826.git.len.brown@intel.com \
    --to=lenb@kernel.org \
    --cc=feng.tang@intel.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sfi-devel@simplefirmware.org \
    --cc=x86@kernel.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

all inboxes | Powered by JetHome®