Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 316507
b: refs/heads/master
c: 574a594
h: refs/heads/master
i:
  316505: f420cce
  316503: eeb8d7f
v: v3
  • Loading branch information
Jiang Liu authored and Bjorn Helgaas committed Jun 22, 2012
1 parent 4d57752 commit 2d4479d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 26 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8503562fd4e8e261bd7ca442705c6e8f0fd88228
refs/heads/master: 574a59414083df3911e5a1514742959b412b6947
46 changes: 21 additions & 25 deletions trunk/arch/x86/pci/mmconfig-shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -544,8 +544,6 @@ static void __init pci_mmcfg_reject_broken(int early)
}
}

static int __initdata known_bridge;

static int __init acpi_mcfg_check_entry(struct acpi_table_mcfg *mcfg,
struct acpi_mcfg_allocation *cfg)
{
Expand Down Expand Up @@ -617,28 +615,7 @@ static int __init pci_parse_mcfg(struct acpi_table_header *header)

static void __init __pci_mmcfg_init(int early)
{
/* MMCONFIG disabled */
if ((pci_probe & PCI_PROBE_MMCONF) == 0)
return;

/* MMCONFIG already enabled */
if (!early && !(pci_probe & PCI_PROBE_MASK & ~PCI_PROBE_MMCONF))
return;

/* for late to exit */
if (known_bridge)
return;

if (early) {
if (pci_mmcfg_check_hostbridge())
known_bridge = 1;
}

if (!known_bridge)
acpi_sfi_table_parse(ACPI_SIG_MCFG, pci_parse_mcfg);

pci_mmcfg_reject_broken(early);

if (list_empty(&pci_mmcfg_list))
return;

Expand All @@ -660,14 +637,33 @@ static void __init __pci_mmcfg_init(int early)
}
}

static int __initdata known_bridge;

void __init pci_mmcfg_early_init(void)
{
__pci_mmcfg_init(1);
if (pci_probe & PCI_PROBE_MMCONF) {
if (pci_mmcfg_check_hostbridge())
known_bridge = 1;
else
acpi_sfi_table_parse(ACPI_SIG_MCFG, pci_parse_mcfg);
__pci_mmcfg_init(1);
}
}

void __init pci_mmcfg_late_init(void)
{
__pci_mmcfg_init(0);
/* MMCONFIG disabled */
if ((pci_probe & PCI_PROBE_MMCONF) == 0)
return;

if (known_bridge)
return;

/* MMCONFIG hasn't been enabled yet, try again */
if (pci_probe & PCI_PROBE_MASK & ~PCI_PROBE_MMCONF) {
acpi_sfi_table_parse(ACPI_SIG_MCFG, pci_parse_mcfg);
__pci_mmcfg_init(0);
}
}

static int __init pci_mmcfg_late_insert_resources(void)
Expand Down

0 comments on commit 2d4479d

Please sign in to comment.