diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2014-01-10 16:23:15 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-01-10 16:23:15 -0500 |
commit | 96702be560374ee7e7139a34cab03554129abbb4 (patch) | |
tree | ede7f763c471fad6d268a2e6a1d17d029b3eaf31 /arch | |
parent | 04f982beb900f37bc216d63c9dbc5bdddb4a3d3a (diff) | |
parent | d56dbf5bab8ce44c5407bb099f71987f58d18bb4 (diff) |
Merge branch 'pci/resource' into next
* pci/resource:
PCI: Allocate 64-bit BARs above 4G when possible
PCI: Enforce bus address limits in resource allocation
PCI: Split out bridge window override of minimum allocation address
agp/ati: Use PCI_COMMAND instead of hard-coded 4
agp/intel: Use CPU physical address, not bus address, for ioremap()
agp/intel: Use pci_bus_address() to get GTTADR bus address
agp/intel: Use pci_bus_address() to get MMADR bus address
agp/intel: Support 64-bit GMADR
agp/intel: Rename gtt_bus_addr to gtt_phys_addr
drm/i915: Rename gtt_bus_addr to gtt_phys_addr
agp: Use pci_resource_start() to get CPU physical address for BAR
agp: Support 64-bit APBASE
PCI: Add pci_bus_address() to get bus address of a BAR
PCI: Convert pcibios_resource_to_bus() to take a pci_bus, not a pci_dev
PCI: Change pci_bus_region addresses to dma_addr_t
Diffstat (limited to 'arch')
-rw-r--r-- | arch/alpha/kernel/pci-sysfs.c | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/pci-common.c | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/pci_of_scan.c | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/pci.c | 6 | ||||
-rw-r--r-- | arch/x86/include/asm/pci.h | 1 |
5 files changed, 9 insertions, 10 deletions
diff --git a/arch/alpha/kernel/pci-sysfs.c b/arch/alpha/kernel/pci-sysfs.c index 2b183b0d3207..99e8d4796c96 100644 --- a/arch/alpha/kernel/pci-sysfs.c +++ b/arch/alpha/kernel/pci-sysfs.c | |||
@@ -83,7 +83,7 @@ static int pci_mmap_resource(struct kobject *kobj, | |||
83 | if (iomem_is_exclusive(res->start)) | 83 | if (iomem_is_exclusive(res->start)) |
84 | return -EINVAL; | 84 | return -EINVAL; |
85 | 85 | ||
86 | pcibios_resource_to_bus(pdev, &bar, res); | 86 | pcibios_resource_to_bus(pdev->bus, &bar, res); |
87 | vma->vm_pgoff += bar.start >> (PAGE_SHIFT - (sparse ? 5 : 0)); | 87 | vma->vm_pgoff += bar.start >> (PAGE_SHIFT - (sparse ? 5 : 0)); |
88 | mmap_type = res->flags & IORESOURCE_MEM ? pci_mmap_mem : pci_mmap_io; | 88 | mmap_type = res->flags & IORESOURCE_MEM ? pci_mmap_mem : pci_mmap_io; |
89 | 89 | ||
@@ -139,7 +139,7 @@ static int sparse_mem_mmap_fits(struct pci_dev *pdev, int num) | |||
139 | long dense_offset; | 139 | long dense_offset; |
140 | unsigned long sparse_size; | 140 | unsigned long sparse_size; |
141 | 141 | ||
142 | pcibios_resource_to_bus(pdev, &bar, &pdev->resource[num]); | 142 | pcibios_resource_to_bus(pdev->bus, &bar, &pdev->resource[num]); |
143 | 143 | ||
144 | /* All core logic chips have 4G sparse address space, except | 144 | /* All core logic chips have 4G sparse address space, except |
145 | CIA which has 16G (see xxx_SPARSE_MEM and xxx_DENSE_MEM | 145 | CIA which has 16G (see xxx_SPARSE_MEM and xxx_DENSE_MEM |
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index a1e3e40ca3fd..d9476c1fc959 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c | |||
@@ -835,7 +835,7 @@ static void pcibios_fixup_resources(struct pci_dev *dev) | |||
835 | * at 0 as unset as well, except if PCI_PROBE_ONLY is also set | 835 | * at 0 as unset as well, except if PCI_PROBE_ONLY is also set |
836 | * since in that case, we don't want to re-assign anything | 836 | * since in that case, we don't want to re-assign anything |
837 | */ | 837 | */ |
838 | pcibios_resource_to_bus(dev, ®, res); | 838 | pcibios_resource_to_bus(dev->bus, ®, res); |
839 | if (pci_has_flag(PCI_REASSIGN_ALL_RSRC) || | 839 | if (pci_has_flag(PCI_REASSIGN_ALL_RSRC) || |
840 | (reg.start == 0 && !pci_has_flag(PCI_PROBE_ONLY))) { | 840 | (reg.start == 0 && !pci_has_flag(PCI_PROBE_ONLY))) { |
841 | /* Only print message if not re-assigning */ | 841 | /* Only print message if not re-assigning */ |
@@ -886,7 +886,7 @@ static int pcibios_uninitialized_bridge_resource(struct pci_bus *bus, | |||
886 | 886 | ||
887 | /* Job is a bit different between memory and IO */ | 887 | /* Job is a bit different between memory and IO */ |
888 | if (res->flags & IORESOURCE_MEM) { | 888 | if (res->flags & IORESOURCE_MEM) { |
889 | pcibios_resource_to_bus(dev, ®ion, res); | 889 | pcibios_resource_to_bus(dev->bus, ®ion, res); |
890 | 890 | ||
891 | /* If the BAR is non-0 then it's probably been initialized */ | 891 | /* If the BAR is non-0 then it's probably been initialized */ |
892 | if (region.start != 0) | 892 | if (region.start != 0) |
diff --git a/arch/powerpc/kernel/pci_of_scan.c b/arch/powerpc/kernel/pci_of_scan.c index ac0b034f9ae0..83c26d829991 100644 --- a/arch/powerpc/kernel/pci_of_scan.c +++ b/arch/powerpc/kernel/pci_of_scan.c | |||
@@ -111,7 +111,7 @@ static void of_pci_parse_addrs(struct device_node *node, struct pci_dev *dev) | |||
111 | res->name = pci_name(dev); | 111 | res->name = pci_name(dev); |
112 | region.start = base; | 112 | region.start = base; |
113 | region.end = base + size - 1; | 113 | region.end = base + size - 1; |
114 | pcibios_bus_to_resource(dev, res, ®ion); | 114 | pcibios_bus_to_resource(dev->bus, res, ®ion); |
115 | } | 115 | } |
116 | } | 116 | } |
117 | 117 | ||
@@ -280,7 +280,7 @@ void of_scan_pci_bridge(struct pci_dev *dev) | |||
280 | res->flags = flags; | 280 | res->flags = flags; |
281 | region.start = of_read_number(&ranges[1], 2); | 281 | region.start = of_read_number(&ranges[1], 2); |
282 | region.end = region.start + size - 1; | 282 | region.end = region.start + size - 1; |
283 | pcibios_bus_to_resource(dev, res, ®ion); | 283 | pcibios_bus_to_resource(dev->bus, res, ®ion); |
284 | } | 284 | } |
285 | sprintf(bus->name, "PCI Bus %04x:%02x", pci_domain_nr(bus), | 285 | sprintf(bus->name, "PCI Bus %04x:%02x", pci_domain_nr(bus), |
286 | bus->number); | 286 | bus->number); |
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c index cb021453de2a..7de8d1f590b7 100644 --- a/arch/sparc/kernel/pci.c +++ b/arch/sparc/kernel/pci.c | |||
@@ -392,7 +392,7 @@ static void apb_fake_ranges(struct pci_dev *dev, | |||
392 | res->flags = IORESOURCE_IO; | 392 | res->flags = IORESOURCE_IO; |
393 | region.start = (first << 21); | 393 | region.start = (first << 21); |
394 | region.end = (last << 21) + ((1 << 21) - 1); | 394 | region.end = (last << 21) + ((1 << 21) - 1); |
395 | pcibios_bus_to_resource(dev, res, ®ion); | 395 | pcibios_bus_to_resource(dev->bus, res, ®ion); |
396 | 396 | ||
397 | pci_read_config_byte(dev, APB_MEM_ADDRESS_MAP, &map); | 397 | pci_read_config_byte(dev, APB_MEM_ADDRESS_MAP, &map); |
398 | apb_calc_first_last(map, &first, &last); | 398 | apb_calc_first_last(map, &first, &last); |
@@ -400,7 +400,7 @@ static void apb_fake_ranges(struct pci_dev *dev, | |||
400 | res->flags = IORESOURCE_MEM; | 400 | res->flags = IORESOURCE_MEM; |
401 | region.start = (first << 29); | 401 | region.start = (first << 29); |
402 | region.end = (last << 29) + ((1 << 29) - 1); | 402 | region.end = (last << 29) + ((1 << 29) - 1); |
403 | pcibios_bus_to_resource(dev, res, ®ion); | 403 | pcibios_bus_to_resource(dev->bus, res, ®ion); |
404 | } | 404 | } |
405 | 405 | ||
406 | static void pci_of_scan_bus(struct pci_pbm_info *pbm, | 406 | static void pci_of_scan_bus(struct pci_pbm_info *pbm, |
@@ -491,7 +491,7 @@ static void of_scan_pci_bridge(struct pci_pbm_info *pbm, | |||
491 | res->flags = flags; | 491 | res->flags = flags; |
492 | region.start = GET_64BIT(ranges, 1); | 492 | region.start = GET_64BIT(ranges, 1); |
493 | region.end = region.start + size - 1; | 493 | region.end = region.start + size - 1; |
494 | pcibios_bus_to_resource(dev, res, ®ion); | 494 | pcibios_bus_to_resource(dev->bus, res, ®ion); |
495 | } | 495 | } |
496 | after_ranges: | 496 | after_ranges: |
497 | sprintf(bus->name, "PCI Bus %04x:%02x", pci_domain_nr(bus), | 497 | sprintf(bus->name, "PCI Bus %04x:%02x", pci_domain_nr(bus), |
diff --git a/arch/x86/include/asm/pci.h b/arch/x86/include/asm/pci.h index 0de52c5bf9a2..1ac6114c9ea5 100644 --- a/arch/x86/include/asm/pci.h +++ b/arch/x86/include/asm/pci.h | |||
@@ -125,7 +125,6 @@ int setup_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, | |||
125 | 125 | ||
126 | /* generic pci stuff */ | 126 | /* generic pci stuff */ |
127 | #include <asm-generic/pci.h> | 127 | #include <asm-generic/pci.h> |
128 | #define PCIBIOS_MAX_MEM_32 0xffffffff | ||
129 | 128 | ||
130 | #ifdef CONFIG_NUMA | 129 | #ifdef CONFIG_NUMA |
131 | /* Returns the node based on pci bus */ | 130 | /* Returns the node based on pci bus */ |