Skip to content

Commit

Permalink
SFI: Hook PCI MMCONFIG
Browse files Browse the repository at this point in the history
First check ACPI, and if that fails, ask SFI to find the MCFG.

Signed-off-by: Feng Tang <[email protected]>
Signed-off-by: Len Brown <[email protected]>
Cc: Jesse Barnes <[email protected]>
  • Loading branch information
ftang1 authored and lenb committed Aug 28, 2009
1 parent efafc8b commit 5f0db7a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions arch/x86/pci/mmconfig-shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -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: "

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion arch/x86/pci/mmconfig_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 5f0db7a

Please sign in to comment.