diff options
| author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-11-30 05:12:13 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-11-30 05:12:13 -0800 |
| commit | dc71d7c63c9bea0a7550669d73151a256fdf30f7 (patch) | |
| tree | e7add54d8a81b2e76ba75921f4da3aacbfc6762a | |
| parent | f0594f08645a108c9d89f600df66275af68d7d6c (diff) | |
| parent | 37283048f8cea5a0346f956d31b865e8cbbe6b4d (diff) | |
Merge bk://kernel.bkbits.net/gregkh/linux/pci-2.6
into ppc970.osdl.org:/home/torvalds/v2.6/linux
| -rw-r--r-- | arch/i386/pci/mmconfig.c | 7 | ||||
| -rw-r--r-- | arch/x86_64/pci/mmconfig.c | 7 | ||||
| -rw-r--r-- | drivers/pci/hotplug/cpqphp_pci.c | 2 | ||||
| -rw-r--r-- | drivers/pci/hotplug/pciehp_hpc.c | 3 | ||||
| -rw-r--r-- | drivers/pci/hotplug/shpchp_hpc.c | 3 | ||||
| -rw-r--r-- | drivers/pci/pci-sysfs.c | 10 |
6 files changed, 31 insertions, 1 deletions
diff --git a/arch/i386/pci/mmconfig.c b/arch/i386/pci/mmconfig.c index 27174fe6438c..504fb18fe87d 100644 --- a/arch/i386/pci/mmconfig.c +++ b/arch/i386/pci/mmconfig.c @@ -102,6 +102,13 @@ static int __init pci_mmcfg_init(void) if (!pci_mmcfg_base_addr) goto out; + /* Kludge for now. Don't use mmconfig on AMD systems because + those have some busses where mmconfig doesn't work, + and we don't parse ACPI MCFG well enough to handle that. + Remove when proper handling is added. */ + if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD) + goto out; + printk(KERN_INFO "PCI: Using MMCONFIG\n"); raw_pci_ops = &pci_mmcfg; pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF; diff --git a/arch/x86_64/pci/mmconfig.c b/arch/x86_64/pci/mmconfig.c index b830c47b1a4a..142b9befee3f 100644 --- a/arch/x86_64/pci/mmconfig.c +++ b/arch/x86_64/pci/mmconfig.c @@ -78,6 +78,13 @@ static int __init pci_mmcfg_init(void) if (!pci_mmcfg_base_addr) return 0; + /* Kludge for now. Don't use mmconfig on AMD systems because + those have some busses where mmconfig doesn't work, + and we don't parse ACPI MCFG well enough to handle that. + Remove when proper handling is added. */ + if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD) + return 0; + /* RED-PEN i386 doesn't do _nocache right now */ pci_mmcfg_virt = ioremap_nocache(pci_mmcfg_base_addr, MMCONFIG_APER_SIZE); if (!pci_mmcfg_virt) { diff --git a/drivers/pci/hotplug/cpqphp_pci.c b/drivers/pci/hotplug/cpqphp_pci.c index c7747e71df39..225973d86331 100644 --- a/drivers/pci/hotplug/cpqphp_pci.c +++ b/drivers/pci/hotplug/cpqphp_pci.c @@ -194,7 +194,7 @@ static int PCI_ScanBusNonBridge (u8 bus, u8 device) static int PCI_ScanBusForNonBridge(struct controller *ctrl, u8 bus_num, u8 * dev_num) { - u8 tdevice; + u16 tdevice; u32 work; u8 tbus; diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index 10d488cb6673..dc1eb106defd 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c @@ -1347,6 +1347,9 @@ int pcie_init(struct controller * ctrl, info("HPC vendor_id %x device_id %x ss_vid %x ss_did %x\n", pdev->vendor, pdev->device, pdev->subsystem_vendor, pdev->subsystem_device); + if (pci_enable_device(pdev)) + goto abort_free_ctlr; + init_MUTEX(&ctrl->crit_sect); /* setup wait queue */ init_waitqueue_head(&ctrl->queue); diff --git a/drivers/pci/hotplug/shpchp_hpc.c b/drivers/pci/hotplug/shpchp_hpc.c index c799ca007977..38c5d9066697 100644 --- a/drivers/pci/hotplug/shpchp_hpc.c +++ b/drivers/pci/hotplug/shpchp_hpc.c @@ -1487,6 +1487,9 @@ int shpc_init(struct controller * ctrl, info("HPC vendor_id %x device_id %x ss_vid %x ss_did %x\n", pdev->vendor, pdev->device, pdev->subsystem_vendor, pdev->subsystem_device); + + if (pci_enable_device(pdev)) + goto abort_free_ctlr; if (!request_mem_region(pci_resource_start(pdev, 0) + shpc_base_offset, pci_resource_len(pdev, 0), MY_NAME)) { err("%s: cannot reserve MMIO region\n", __FUNCTION__); diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 84728283f0d5..7fcf935c51b5 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -19,6 +19,7 @@ #include <linux/kernel.h> #include <linux/pci.h> #include <linux/stat.h> +#include <linux/topology.h> #include "pci.h" @@ -42,6 +43,14 @@ pci_config_attr(subsystem_device, "0x%04x\n"); pci_config_attr(class, "0x%06x\n"); pci_config_attr(irq, "%u\n"); +static ssize_t local_cpus_show(struct device *dev, char *buf) +{ + cpumask_t mask = pcibus_to_cpumask(to_pci_dev(dev)->bus->number); + int len = cpumask_scnprintf(buf, PAGE_SIZE-2, mask); + strcat(buf,"\n"); + return 1+len; +} + /* show resources */ static ssize_t resource_show(struct device * dev, char * buf) @@ -71,6 +80,7 @@ struct device_attribute pci_dev_attrs[] = { __ATTR_RO(subsystem_device), __ATTR_RO(class), __ATTR_RO(irq), + __ATTR_RO(local_cpus), __ATTR_NULL, }; |
