Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 48410
b: refs/heads/master
c: 56829d1
h: refs/heads/master
v: v3
  • Loading branch information
OGAWA Hirofumi authored and Andi Kleen committed Feb 13, 2007
1 parent 1803693 commit 2256a46
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 6 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: 429d512e532ec9c969aa6f66ddbc542f3a5fe4da
refs/heads/master: 56829d1982b6f1150553c049d372728b9eda5aec
12 changes: 7 additions & 5 deletions trunk/arch/i386/pci/mmconfig-shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,14 @@ static void __init unreachable_devices(void)
if (val1 == 0xffffffff)
continue;

raw_pci_ops->read(0, bus, devfn, 0, 4, &val2);
if (val1 != val2) {
set_bit(i + 32 * bus, pci_mmcfg_fallback_slots);
printk(KERN_NOTICE "PCI: No mmconfig possible"
" on device %02x:%02x\n", bus, i);
if (pci_mmcfg_arch_reachable(0, bus, devfn)) {
raw_pci_ops->read(0, bus, devfn, 0, 4, &val2);
if (val1 == val2)
continue;
}
set_bit(i + 32 * bus, pci_mmcfg_fallback_slots);
printk(KERN_NOTICE "PCI: No mmconfig possible on device"
" %02x:%02x\n", bus, i);
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions trunk/arch/i386/pci/mmconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ static struct pci_raw_ops pci_mmcfg = {
.write = pci_mmcfg_write,
};

int __init pci_mmcfg_arch_reachable(unsigned int seg, unsigned int bus,
unsigned int devfn)
{
return get_base_addr(seg, bus, devfn) != 0;
}

int __init pci_mmcfg_arch_init(void)
{
printk(KERN_INFO "PCI: Using MMCONFIG\n");
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/i386/pci/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,6 @@ extern void pcibios_sort(void);
#define PCI_MMCFG_MAX_CHECK_BUS 16
extern DECLARE_BITMAP(pci_mmcfg_fallback_slots, 32*PCI_MMCFG_MAX_CHECK_BUS);

extern int __init pci_mmcfg_arch_reachable(unsigned int seg, unsigned int bus,
unsigned int devfn);
extern int __init pci_mmcfg_arch_init(void);
6 changes: 6 additions & 0 deletions trunk/arch/x86_64/pci/mmconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ static void __iomem * __init mcfg_ioremap(struct acpi_mcfg_allocation *cfg)
return addr;
}

int __init pci_mmcfg_arch_reachable(unsigned int seg, unsigned int bus,
unsigned int devfn)
{
return pci_dev_base(seg, bus, devfn) != NULL;
}

int __init pci_mmcfg_arch_init(void)
{
int i;
Expand Down

0 comments on commit 2256a46

Please sign in to comment.