summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPalmer Dabbelt <palmer@dabbelt.com>2017-06-23 21:50:42 -0400
committerBjorn Helgaas <bhelgaas@google.com>2017-08-02 15:43:38 -0400
commitbccf90d6e063d278b9ddc78dd266d0adef29886c (patch)
tree08579c44a77ee7c747ccb0802d2628034868665f
parent16f73eb02d7e1765ccab3d2018e0bd98eb93d973 (diff)
PCI: Add a generic weak pcibios_fixup_bus()
Multiple architectures define this as an empty function, and I'm adding another one as part of the RISC-V port. Add a __weak version of pcibios_fixup_bus() and delete the now-obselete ones in a handful of ports. The only functional change should be that microblaze used to export pcibios_fixup_bus(). None of the other architectures exports this, so I just dropped it. Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-rw-r--r--arch/arc/kernel/pcibios.c4
-rw-r--r--arch/arm64/kernel/pci.c8
-rw-r--r--arch/cris/arch-v32/drivers/pci/bios.c4
-rw-r--r--arch/microblaze/pci/pci-common.c6
-rw-r--r--arch/s390/pci/pci.c4
-rw-r--r--arch/sh/drivers/pci/pci.c8
-rw-r--r--arch/sparc/kernel/pci.c4
-rw-r--r--arch/tile/kernel/pci.c8
-rw-r--r--arch/tile/kernel/pci_gx.c5
-rw-r--r--drivers/pci/probe.c9
10 files changed, 9 insertions, 51 deletions
diff --git a/arch/arc/kernel/pcibios.c b/arch/arc/kernel/pcibios.c
index 72e1d73d0bd6..1c8df8fd5fed 100644
--- a/arch/arc/kernel/pcibios.c
+++ b/arch/arc/kernel/pcibios.c
@@ -16,7 +16,3 @@ resource_size_t pcibios_align_resource(void *data, const struct resource *res,
16{ 16{
17 return res->start; 17 return res->start;
18} 18}
19
20void pcibios_fixup_bus(struct pci_bus *bus)
21{
22}
diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c
index e2b7e4f9cc31..d91051259bb2 100644
--- a/arch/arm64/kernel/pci.c
+++ b/arch/arm64/kernel/pci.c
@@ -23,14 +23,6 @@
23#include <linux/slab.h> 23#include <linux/slab.h>
24 24
25/* 25/*
26 * Called after each bus is probed, but before its children are examined
27 */
28void pcibios_fixup_bus(struct pci_bus *bus)
29{
30 /* nothing to do, expected to be removed in the future */
31}
32
33/*
34 * We don't have to worry about legacy ISA devices, so nothing to do here 26 * We don't have to worry about legacy ISA devices, so nothing to do here
35 */ 27 */
36resource_size_t pcibios_align_resource(void *data, const struct resource *res, 28resource_size_t pcibios_align_resource(void *data, const struct resource *res,
diff --git a/arch/cris/arch-v32/drivers/pci/bios.c b/arch/cris/arch-v32/drivers/pci/bios.c
index 394c2a73d5e2..5cc622c0225e 100644
--- a/arch/cris/arch-v32/drivers/pci/bios.c
+++ b/arch/cris/arch-v32/drivers/pci/bios.c
@@ -2,10 +2,6 @@
2#include <linux/kernel.h> 2#include <linux/kernel.h>
3#include <hwregs/intr_vect.h> 3#include <hwregs/intr_vect.h>
4 4
5void pcibios_fixup_bus(struct pci_bus *b)
6{
7}
8
9void pcibios_set_master(struct pci_dev *dev) 5void pcibios_set_master(struct pci_dev *dev)
10{ 6{
11 u8 lat; 7 u8 lat;
diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c
index 404fb38d06b7..940f266e5d5c 100644
--- a/arch/microblaze/pci/pci-common.c
+++ b/arch/microblaze/pci/pci-common.c
@@ -810,12 +810,6 @@ void pcibios_setup_bus_devices(struct pci_bus *bus)
810 } 810 }
811} 811}
812 812
813void pcibios_fixup_bus(struct pci_bus *bus)
814{
815 /* nothing to do */
816}
817EXPORT_SYMBOL(pcibios_fixup_bus);
818
819/* 813/*
820 * We need to avoid collisions with `mirrored' VGA ports 814 * We need to avoid collisions with `mirrored' VGA ports
821 * and other strange ISA hardware, so we always want the 815 * and other strange ISA hardware, so we always want the
diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c
index 7b30af5da222..ddb9923fb45d 100644
--- a/arch/s390/pci/pci.c
+++ b/arch/s390/pci/pci.c
@@ -262,10 +262,6 @@ static int zpci_cfg_store(struct zpci_dev *zdev, int offset, u32 val, u8 len)
262 return rc; 262 return rc;
263} 263}
264 264
265void pcibios_fixup_bus(struct pci_bus *bus)
266{
267}
268
269resource_size_t pcibios_align_resource(void *data, const struct resource *res, 265resource_size_t pcibios_align_resource(void *data, const struct resource *res,
270 resource_size_t size, 266 resource_size_t size,
271 resource_size_t align) 267 resource_size_t align)
diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c
index c99ee286b69f..749642e1272e 100644
--- a/arch/sh/drivers/pci/pci.c
+++ b/arch/sh/drivers/pci/pci.c
@@ -155,14 +155,6 @@ static int __init pcibios_init(void)
155subsys_initcall(pcibios_init); 155subsys_initcall(pcibios_init);
156 156
157/* 157/*
158 * Called after each bus is probed, but before its children
159 * are examined.
160 */
161void pcibios_fixup_bus(struct pci_bus *bus)
162{
163}
164
165/*
166 * We need to avoid collisions with `mirrored' VGA ports 158 * We need to avoid collisions with `mirrored' VGA ports
167 * and other strange ISA hardware, so we always want the 159 * and other strange ISA hardware, so we always want the
168 * addresses to be allocated in the 0x000-0x0ff region 160 * addresses to be allocated in the 0x000-0x0ff region
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
index 7eceaa10836f..78d3dc25e126 100644
--- a/arch/sparc/kernel/pci.c
+++ b/arch/sparc/kernel/pci.c
@@ -690,10 +690,6 @@ struct pci_bus *pci_scan_one_pbm(struct pci_pbm_info *pbm,
690 return bus; 690 return bus;
691} 691}
692 692
693void pcibios_fixup_bus(struct pci_bus *pbus)
694{
695}
696
697resource_size_t pcibios_align_resource(void *data, const struct resource *res, 693resource_size_t pcibios_align_resource(void *data, const struct resource *res,
698 resource_size_t size, resource_size_t align) 694 resource_size_t size, resource_size_t align)
699{ 695{
diff --git a/arch/tile/kernel/pci.c b/arch/tile/kernel/pci.c
index bc6656b5708b..3113d4d5c329 100644
--- a/arch/tile/kernel/pci.c
+++ b/arch/tile/kernel/pci.c
@@ -369,14 +369,6 @@ int __init pcibios_init(void)
369} 369}
370subsys_initcall(pcibios_init); 370subsys_initcall(pcibios_init);
371 371
372/*
373 * No bus fixups needed.
374 */
375void pcibios_fixup_bus(struct pci_bus *bus)
376{
377 /* Nothing needs to be done. */
378}
379
380void pcibios_set_master(struct pci_dev *dev) 372void pcibios_set_master(struct pci_dev *dev)
381{ 373{
382 /* No special bus mastering setup handling. */ 374 /* No special bus mastering setup handling. */
diff --git a/arch/tile/kernel/pci_gx.c b/arch/tile/kernel/pci_gx.c
index b554a68eea1b..b89172b592cc 100644
--- a/arch/tile/kernel/pci_gx.c
+++ b/arch/tile/kernel/pci_gx.c
@@ -1038,11 +1038,6 @@ alloc_mem_map_failed:
1038} 1038}
1039subsys_initcall(pcibios_init); 1039subsys_initcall(pcibios_init);
1040 1040
1041/* No bus fixups needed. */
1042void pcibios_fixup_bus(struct pci_bus *bus)
1043{
1044}
1045
1046/* Process any "pci=" kernel boot arguments. */ 1041/* Process any "pci=" kernel boot arguments. */
1047char *__init pcibios_setup(char *str) 1042char *__init pcibios_setup(char *str)
1048{ 1043{
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index c31310db0404..376c61173b4e 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -2288,6 +2288,15 @@ void pcie_bus_configure_settings(struct pci_bus *bus)
2288} 2288}
2289EXPORT_SYMBOL_GPL(pcie_bus_configure_settings); 2289EXPORT_SYMBOL_GPL(pcie_bus_configure_settings);
2290 2290
2291/*
2292 * Called after each bus is probed, but before its children are examined. This
2293 * is marked as __weak because multiple architectures define it.
2294 */
2295void __weak pcibios_fixup_bus(struct pci_bus *bus)
2296{
2297 /* nothing to do, expected to be removed in the future */
2298}
2299
2291unsigned int pci_scan_child_bus(struct pci_bus *bus) 2300unsigned int pci_scan_child_bus(struct pci_bus *bus)
2292{ 2301{
2293 unsigned int devfn, pass, max = bus->busn_res.start; 2302 unsigned int devfn, pass, max = bus->busn_res.start;