Commit dc71d7c6 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://kernel.bkbits.net/gregkh/linux/pci-2.6

into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents f0594f08 37283048
......@@ -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;
......
......@@ -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) {
......
......@@ -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;
......
......@@ -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);
......
......@@ -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__);
......
......@@ -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,
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment