aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2014-03-19 17:11:19 -0400
committerBjorn Helgaas <bhelgaas@google.com>2014-03-19 17:11:19 -0400
commit30723cbf6f7aec2ab4810bdc4bf12c5749a09e33 (patch)
tree840833435357419595fee44b2a06f9864f1458c9 /arch
parent91b4adc983d8e9975bc677c2b8395631edf7b92d (diff)
parentf2e6027b816df3326d3f40d6ce55539a2f381529 (diff)
Merge branch 'pci/resource' into next
* pci/resource: (26 commits) Revert "[PATCH] Insert GART region into resource map" PCI: Log IDE resource quirk in dmesg PCI: Change pci_bus_alloc_resource() type_mask to unsigned long PCI: Check all IORESOURCE_TYPE_BITS in pci_bus_alloc_from_region() resources: Set type in __request_region() PCI: Don't check resource_size() in pci_bus_alloc_resource() s390/PCI: Use generic pci_enable_resources() tile PCI RC: Use default pcibios_enable_device() sparc/PCI: Use default pcibios_enable_device() (Leon only) sh/PCI: Use default pcibios_enable_device() microblaze/PCI: Use default pcibios_enable_device() alpha/PCI: Use default pcibios_enable_device() PCI: Add "weak" generic pcibios_enable_device() implementation PCI: Don't enable decoding if BAR hasn't been assigned an address PCI: Mark 64-bit resource as IORESOURCE_UNSET if we only support 32-bit PCI: Don't try to claim IORESOURCE_UNSET resources PCI: Check IORESOURCE_UNSET before updating BAR PCI: Don't clear IORESOURCE_UNSET when updating BAR PCI: Mark resources as IORESOURCE_UNSET if we can't assign them PCI: Remove pci_find_parent_resource() use for allocation ...
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/kernel/pci.c6
-rw-r--r--arch/microblaze/pci/pci-common.c5
-rw-r--r--arch/s390/pci/pci.c16
-rw-r--r--arch/sh/drivers/pci/pci.c5
-rw-r--r--arch/sparc/kernel/leon_pci.c5
-rw-r--r--arch/tile/kernel/pci_gx.c12
-rw-r--r--arch/x86/kernel/aperture_64.c20
7 files changed, 2 insertions, 67 deletions
diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c
index edb4e0097b75..076c35cd6cde 100644
--- a/arch/alpha/kernel/pci.c
+++ b/arch/alpha/kernel/pci.c
@@ -254,12 +254,6 @@ void pcibios_fixup_bus(struct pci_bus *bus)
254 } 254 }
255} 255}
256 256
257int
258pcibios_enable_device(struct pci_dev *dev, int mask)
259{
260 return pci_enable_resources(dev, mask);
261}
262
263/* 257/*
264 * If we set up a device for bus mastering, we need to check the latency 258 * If we set up a device for bus mastering, we need to check the latency
265 * timer as certain firmware forgets to set it properly, as seen 259 * timer as certain firmware forgets to set it properly, as seen
diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c
index 66804adcacf0..70996cc66aa2 100644
--- a/arch/microblaze/pci/pci-common.c
+++ b/arch/microblaze/pci/pci-common.c
@@ -1294,11 +1294,6 @@ void pcibios_finish_adding_to_bus(struct pci_bus *bus)
1294} 1294}
1295EXPORT_SYMBOL_GPL(pcibios_finish_adding_to_bus); 1295EXPORT_SYMBOL_GPL(pcibios_finish_adding_to_bus);
1296 1296
1297int pcibios_enable_device(struct pci_dev *dev, int mask)
1298{
1299 return pci_enable_resources(dev, mask);
1300}
1301
1302static void pcibios_setup_phb_resources(struct pci_controller *hose, 1297static void pcibios_setup_phb_resources(struct pci_controller *hose,
1303 struct list_head *resources) 1298 struct list_head *resources)
1304{ 1299{
diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c
index 66670ff262a0..1df1d29ac81d 100644
--- a/arch/s390/pci/pci.c
+++ b/arch/s390/pci/pci.c
@@ -686,27 +686,13 @@ int pcibios_add_device(struct pci_dev *pdev)
686int pcibios_enable_device(struct pci_dev *pdev, int mask) 686int pcibios_enable_device(struct pci_dev *pdev, int mask)
687{ 687{
688 struct zpci_dev *zdev = get_zdev(pdev); 688 struct zpci_dev *zdev = get_zdev(pdev);
689 struct resource *res;
690 u16 cmd;
691 int i;
692 689
693 zdev->pdev = pdev; 690 zdev->pdev = pdev;
694 zpci_debug_init_device(zdev); 691 zpci_debug_init_device(zdev);
695 zpci_fmb_enable_device(zdev); 692 zpci_fmb_enable_device(zdev);
696 zpci_map_resources(zdev); 693 zpci_map_resources(zdev);
697 694
698 pci_read_config_word(pdev, PCI_COMMAND, &cmd); 695 return pci_enable_resources(pdev, mask);
699 for (i = 0; i < PCI_BAR_COUNT; i++) {
700 res = &pdev->resource[i];
701
702 if (res->flags & IORESOURCE_IO)
703 return -EINVAL;
704
705 if (res->flags & IORESOURCE_MEM)
706 cmd |= PCI_COMMAND_MEMORY;
707 }
708 pci_write_config_word(pdev, PCI_COMMAND, cmd);
709 return 0;
710} 696}
711 697
712void pcibios_disable_device(struct pci_dev *pdev) 698void pcibios_disable_device(struct pci_dev *pdev)
diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c
index 60ed3e1c4b75..1bc09ee7948f 100644
--- a/arch/sh/drivers/pci/pci.c
+++ b/arch/sh/drivers/pci/pci.c
@@ -186,11 +186,6 @@ resource_size_t pcibios_align_resource(void *data, const struct resource *res,
186 return start; 186 return start;
187} 187}
188 188
189int pcibios_enable_device(struct pci_dev *dev, int mask)
190{
191 return pci_enable_resources(dev, mask);
192}
193
194static void __init 189static void __init
195pcibios_bus_report_status_early(struct pci_channel *hose, 190pcibios_bus_report_status_early(struct pci_channel *hose,
196 int top_bus, int current_bus, 191 int top_bus, int current_bus,
diff --git a/arch/sparc/kernel/leon_pci.c b/arch/sparc/kernel/leon_pci.c
index 88aaaa57bb64..e16c4157e1ae 100644
--- a/arch/sparc/kernel/leon_pci.c
+++ b/arch/sparc/kernel/leon_pci.c
@@ -99,11 +99,6 @@ resource_size_t pcibios_align_resource(void *data, const struct resource *res,
99 return res->start; 99 return res->start;
100} 100}
101 101
102int pcibios_enable_device(struct pci_dev *dev, int mask)
103{
104 return pci_enable_resources(dev, mask);
105}
106
107/* in/out routines taken from pcic.c 102/* in/out routines taken from pcic.c
108 * 103 *
109 * This probably belongs here rather than ioport.c because 104 * This probably belongs here rather than ioport.c because
diff --git a/arch/tile/kernel/pci_gx.c b/arch/tile/kernel/pci_gx.c
index a97a6452b812..077b7bc437e5 100644
--- a/arch/tile/kernel/pci_gx.c
+++ b/arch/tile/kernel/pci_gx.c
@@ -1065,18 +1065,6 @@ char *__init pcibios_setup(char *str)
1065} 1065}
1066 1066
1067/* 1067/*
1068 * Enable memory address decoding, as appropriate, for the
1069 * device described by the 'dev' struct.
1070 *
1071 * This is called from the generic PCI layer, and can be called
1072 * for bridges or endpoints.
1073 */
1074int pcibios_enable_device(struct pci_dev *dev, int mask)
1075{
1076 return pci_enable_resources(dev, mask);
1077}
1078
1079/*
1080 * Called for each device after PCI setup is done. 1068 * Called for each device after PCI setup is done.
1081 * We initialize the PCI device capabilities conservatively, assuming that 1069 * We initialize the PCI device capabilities conservatively, assuming that
1082 * all devices can only address the 32-bit DMA space. The exception here is 1070 * all devices can only address the 32-bit DMA space. The exception here is
diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c
index fd972a3e4cbb..9fa8aa051f54 100644
--- a/arch/x86/kernel/aperture_64.c
+++ b/arch/x86/kernel/aperture_64.c
@@ -18,7 +18,6 @@
18#include <linux/pci_ids.h> 18#include <linux/pci_ids.h>
19#include <linux/pci.h> 19#include <linux/pci.h>
20#include <linux/bitops.h> 20#include <linux/bitops.h>
21#include <linux/ioport.h>
22#include <linux/suspend.h> 21#include <linux/suspend.h>
23#include <asm/e820.h> 22#include <asm/e820.h>
24#include <asm/io.h> 23#include <asm/io.h>
@@ -54,18 +53,6 @@ int fallback_aper_force __initdata;
54 53
55int fix_aperture __initdata = 1; 54int fix_aperture __initdata = 1;
56 55
57static struct resource gart_resource = {
58 .name = "GART",
59 .flags = IORESOURCE_MEM,
60};
61
62static void __init insert_aperture_resource(u32 aper_base, u32 aper_size)
63{
64 gart_resource.start = aper_base;
65 gart_resource.end = aper_base + aper_size - 1;
66 insert_resource(&iomem_resource, &gart_resource);
67}
68
69/* This code runs before the PCI subsystem is initialized, so just 56/* This code runs before the PCI subsystem is initialized, so just
70 access the northbridge directly. */ 57 access the northbridge directly. */
71 58
@@ -96,7 +83,6 @@ static u32 __init allocate_aperture(void)
96 memblock_reserve(addr, aper_size); 83 memblock_reserve(addr, aper_size);
97 printk(KERN_INFO "Mapping aperture over %d KB of RAM @ %lx\n", 84 printk(KERN_INFO "Mapping aperture over %d KB of RAM @ %lx\n",
98 aper_size >> 10, addr); 85 aper_size >> 10, addr);
99 insert_aperture_resource((u32)addr, aper_size);
100 register_nosave_region(addr >> PAGE_SHIFT, 86 register_nosave_region(addr >> PAGE_SHIFT,
101 (addr+aper_size) >> PAGE_SHIFT); 87 (addr+aper_size) >> PAGE_SHIFT);
102 88
@@ -444,12 +430,8 @@ int __init gart_iommu_hole_init(void)
444 430
445out: 431out:
446 if (!fix && !fallback_aper_force) { 432 if (!fix && !fallback_aper_force) {
447 if (last_aper_base) { 433 if (last_aper_base)
448 unsigned long n = (32 * 1024 * 1024) << last_aper_order;
449
450 insert_aperture_resource((u32)last_aper_base, n);
451 return 1; 434 return 1;
452 }
453 return 0; 435 return 0;
454 } 436 }
455 437