aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2007-03-27 01:53:30 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-05-02 22:02:35 -0400
commit96bde06a2df1b363206d3cdef53134b84ff37813 (patch)
tree4d3cc2c8c73a0534bc65e56ff1dec39eaa823b4c
parent6ba186361ed2cda7e174856a3ab8a8e3237b3c3d (diff)
pci: do not mark exported functions as __devinit
Functions marked __devinit will be removed after kernel init. But being exported they are potentially called by a module much later. So the safer choice seems to be to keep the function even in the non CONFIG_HOTPLUG case. This silence the follwoing section mismatch warnings: WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_add_device from __ksymtab_gpl between '__ksymtab_pci_bus_add_device' (at offset 0x20) and '__ksymtab_pci_walk_bus' WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_create_bus from __ksymtab_gpl between '__ksymtab_pci_create_bus' (at offset 0x40) and '__ksymtab_pci_stop_bus_device' WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_max_busnr from __ksymtab_gpl between '__ksymtab_pci_bus_max_busnr' (at offset 0xc0) and '__ksymtab_pci_assign_resource_fixed' WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_claim_resource from __ksymtab_gpl between '__ksymtab_pci_claim_resource' (at offset 0xe0) and '__ksymtab_pcie_port_bus_type' WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_add_devices from __ksymtab between '__ksymtab_pci_bus_add_devices' (at offset 0x70) and '__ksymtab_pci_bus_alloc_resource' WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_scan_bus_parented from __ksymtab between '__ksymtab_pci_scan_bus_parented' (at offset 0x90) and '__ksymtab_pci_root_buses' WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_assign_resources from __ksymtab between '__ksymtab_pci_bus_assign_resources' (at offset 0x4d0) and '__ksymtab_pci_bus_size_bridges' WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_size_bridges from __ksymtab between '__ksymtab_pci_bus_size_bridges' (at offset 0x4e0) and '__ksymtab_pci_setup_cardbus' Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/pci/bus.c4
-rw-r--r--drivers/pci/pci.c3
-rw-r--r--drivers/pci/probe.c23
-rw-r--r--drivers/pci/search.c3
-rw-r--r--drivers/pci/setup-bus.c21
-rw-r--r--drivers/pci/setup-res.c6
6 files changed, 24 insertions, 36 deletions
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
index aadaa3c8096b..9e5ea074ad20 100644
--- a/drivers/pci/bus.c
+++ b/drivers/pci/bus.c
@@ -77,7 +77,7 @@ pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res,
77 * This adds a single pci device to the global 77 * This adds a single pci device to the global
78 * device list and adds sysfs and procfs entries 78 * device list and adds sysfs and procfs entries
79 */ 79 */
80int __devinit pci_bus_add_device(struct pci_dev *dev) 80int pci_bus_add_device(struct pci_dev *dev)
81{ 81{
82 int retval; 82 int retval;
83 retval = device_add(&dev->dev); 83 retval = device_add(&dev->dev);
@@ -105,7 +105,7 @@ int __devinit pci_bus_add_device(struct pci_dev *dev)
105 * 105 *
106 * Call hotplug for each new devices. 106 * Call hotplug for each new devices.
107 */ 107 */
108void __devinit pci_bus_add_devices(struct pci_bus *bus) 108void pci_bus_add_devices(struct pci_bus *bus)
109{ 109{
110 struct pci_dev *dev; 110 struct pci_dev *dev;
111 int retval; 111 int retval;
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 7bd8a725bea2..fd47ac0c4730 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -35,8 +35,7 @@ unsigned long pci_cardbus_mem_size = DEFAULT_CARDBUS_MEM_SIZE;
35 * Given a PCI bus, returns the highest PCI bus number present in the set 35 * Given a PCI bus, returns the highest PCI bus number present in the set
36 * including the given PCI bus and its list of child PCI buses. 36 * including the given PCI bus and its list of child PCI buses.
37 */ 37 */
38unsigned char __devinit 38unsigned char pci_bus_max_busnr(struct pci_bus* bus)
39pci_bus_max_busnr(struct pci_bus* bus)
40{ 39{
41 struct list_head *tmp; 40 struct list_head *tmp;
42 unsigned char max, n; 41 unsigned char max, n;
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 2fe1d690eb13..629edf39a07d 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -364,7 +364,7 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
364 } 364 }
365} 365}
366 366
367static struct pci_bus * __devinit pci_alloc_bus(void) 367static struct pci_bus * pci_alloc_bus(void)
368{ 368{
369 struct pci_bus *b; 369 struct pci_bus *b;
370 370
@@ -432,7 +432,7 @@ error_register:
432 return NULL; 432 return NULL;
433} 433}
434 434
435struct pci_bus * __devinit pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, int busnr) 435struct pci_bus *pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, int busnr)
436{ 436{
437 struct pci_bus *child; 437 struct pci_bus *child;
438 438
@@ -461,7 +461,7 @@ static void pci_enable_crs(struct pci_dev *dev)
461 pci_write_config_word(dev, rpcap + PCI_EXP_RTCTL, rpctl); 461 pci_write_config_word(dev, rpcap + PCI_EXP_RTCTL, rpctl);
462} 462}
463 463
464static void __devinit pci_fixup_parent_subordinate_busnr(struct pci_bus *child, int max) 464static void pci_fixup_parent_subordinate_busnr(struct pci_bus *child, int max)
465{ 465{
466 struct pci_bus *parent = child->parent; 466 struct pci_bus *parent = child->parent;
467 467
@@ -477,7 +477,7 @@ static void __devinit pci_fixup_parent_subordinate_busnr(struct pci_bus *child,
477 } 477 }
478} 478}
479 479
480unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus); 480unsigned int pci_scan_child_bus(struct pci_bus *bus);
481 481
482/* 482/*
483 * If it's a bridge, configure it and scan the bus behind it. 483 * If it's a bridge, configure it and scan the bus behind it.
@@ -489,7 +489,7 @@ unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus);
489 * them, we proceed to assigning numbers to the remaining buses in 489 * them, we proceed to assigning numbers to the remaining buses in
490 * order to avoid overlaps between old and new bus numbers. 490 * order to avoid overlaps between old and new bus numbers.
491 */ 491 */
492int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass) 492int pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass)
493{ 493{
494 struct pci_bus *child; 494 struct pci_bus *child;
495 int is_cardbus = (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS); 495 int is_cardbus = (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS);
@@ -912,7 +912,7 @@ pci_scan_device(struct pci_bus *bus, int devfn)
912 return dev; 912 return dev;
913} 913}
914 914
915void __devinit pci_device_add(struct pci_dev *dev, struct pci_bus *bus) 915void pci_device_add(struct pci_dev *dev, struct pci_bus *bus)
916{ 916{
917 device_initialize(&dev->dev); 917 device_initialize(&dev->dev);
918 dev->dev.release = pci_release_dev; 918 dev->dev.release = pci_release_dev;
@@ -935,8 +935,7 @@ void __devinit pci_device_add(struct pci_dev *dev, struct pci_bus *bus)
935 up_write(&pci_bus_sem); 935 up_write(&pci_bus_sem);
936} 936}
937 937
938struct pci_dev * __devinit 938struct pci_dev *pci_scan_single_device(struct pci_bus *bus, int devfn)
939pci_scan_single_device(struct pci_bus *bus, int devfn)
940{ 939{
941 struct pci_dev *dev; 940 struct pci_dev *dev;
942 941
@@ -958,7 +957,7 @@ pci_scan_single_device(struct pci_bus *bus, int devfn)
958 * discovered devices to the @bus->devices list. New devices 957 * discovered devices to the @bus->devices list. New devices
959 * will have an empty dev->global_list head. 958 * will have an empty dev->global_list head.
960 */ 959 */
961int __devinit pci_scan_slot(struct pci_bus *bus, int devfn) 960int pci_scan_slot(struct pci_bus *bus, int devfn)
962{ 961{
963 int func, nr = 0; 962 int func, nr = 0;
964 int scan_all_fns; 963 int scan_all_fns;
@@ -991,7 +990,7 @@ int __devinit pci_scan_slot(struct pci_bus *bus, int devfn)
991 return nr; 990 return nr;
992} 991}
993 992
994unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus) 993unsigned int pci_scan_child_bus(struct pci_bus *bus)
995{ 994{
996 unsigned int devfn, pass, max = bus->secondary; 995 unsigned int devfn, pass, max = bus->secondary;
997 struct pci_dev *dev; 996 struct pci_dev *dev;
@@ -1041,7 +1040,7 @@ unsigned int __devinit pci_do_scan_bus(struct pci_bus *bus)
1041 return max; 1040 return max;
1042} 1041}
1043 1042
1044struct pci_bus * __devinit pci_create_bus(struct device *parent, 1043struct pci_bus * pci_create_bus(struct device *parent,
1045 int bus, struct pci_ops *ops, void *sysdata) 1044 int bus, struct pci_ops *ops, void *sysdata)
1046{ 1045{
1047 int error; 1046 int error;
@@ -1119,7 +1118,7 @@ err_out:
1119} 1118}
1120EXPORT_SYMBOL_GPL(pci_create_bus); 1119EXPORT_SYMBOL_GPL(pci_create_bus);
1121 1120
1122struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, 1121struct pci_bus *pci_scan_bus_parented(struct device *parent,
1123 int bus, struct pci_ops *ops, void *sysdata) 1122 int bus, struct pci_ops *ops, void *sysdata)
1124{ 1123{
1125 struct pci_bus *b; 1124 struct pci_bus *b;
diff --git a/drivers/pci/search.c b/drivers/pci/search.c
index 2dd8681d6b31..b137a27472c7 100644
--- a/drivers/pci/search.c
+++ b/drivers/pci/search.c
@@ -15,8 +15,7 @@
15 15
16DECLARE_RWSEM(pci_bus_sem); 16DECLARE_RWSEM(pci_bus_sem);
17 17
18static struct pci_bus * 18static struct pci_bus *pci_do_find_bus(struct pci_bus *bus, unsigned char busnr)
19pci_do_find_bus(struct pci_bus* bus, unsigned char busnr)
20{ 19{
21 struct pci_bus* child; 20 struct pci_bus* child;
22 struct list_head *tmp; 21 struct list_head *tmp;
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 3554f3948814..5ec297d7a5b4 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -36,8 +36,7 @@
36 36
37#define ROUND_UP(x, a) (((x) + (a) - 1) & ~((a) - 1)) 37#define ROUND_UP(x, a) (((x) + (a) - 1) & ~((a) - 1))
38 38
39static void __devinit 39static void pbus_assign_resources_sorted(struct pci_bus *bus)
40pbus_assign_resources_sorted(struct pci_bus *bus)
41{ 40{
42 struct pci_dev *dev; 41 struct pci_dev *dev;
43 struct resource *res; 42 struct resource *res;
@@ -220,8 +219,7 @@ pci_setup_bridge(struct pci_bus *bus)
220/* Check whether the bridge supports optional I/O and 219/* Check whether the bridge supports optional I/O and
221 prefetchable memory ranges. If not, the respective 220 prefetchable memory ranges. If not, the respective
222 base/limit registers must be read-only and read as 0. */ 221 base/limit registers must be read-only and read as 0. */
223static void __devinit 222static void pci_bridge_check_ranges(struct pci_bus *bus)
224pci_bridge_check_ranges(struct pci_bus *bus)
225{ 223{
226 u16 io; 224 u16 io;
227 u32 pmem; 225 u32 pmem;
@@ -259,8 +257,7 @@ pci_bridge_check_ranges(struct pci_bus *bus)
259 bus resource of a given type. Note: we intentionally skip 257 bus resource of a given type. Note: we intentionally skip
260 the bus resources which have already been assigned (that is, 258 the bus resources which have already been assigned (that is,
261 have non-NULL parent resource). */ 259 have non-NULL parent resource). */
262static struct resource * __devinit 260static struct resource *find_free_bus_resource(struct pci_bus *bus, unsigned long type)
263find_free_bus_resource(struct pci_bus *bus, unsigned long type)
264{ 261{
265 int i; 262 int i;
266 struct resource *r; 263 struct resource *r;
@@ -281,8 +278,7 @@ find_free_bus_resource(struct pci_bus *bus, unsigned long type)
281 since these windows have 4K granularity and the IO ranges 278 since these windows have 4K granularity and the IO ranges
282 of non-bridge PCI devices are limited to 256 bytes. 279 of non-bridge PCI devices are limited to 256 bytes.
283 We must be careful with the ISA aliasing though. */ 280 We must be careful with the ISA aliasing though. */
284static void __devinit 281static void pbus_size_io(struct pci_bus *bus)
285pbus_size_io(struct pci_bus *bus)
286{ 282{
287 struct pci_dev *dev; 283 struct pci_dev *dev;
288 struct resource *b_res = find_free_bus_resource(bus, IORESOURCE_IO); 284 struct resource *b_res = find_free_bus_resource(bus, IORESOURCE_IO);
@@ -326,8 +322,7 @@ pbus_size_io(struct pci_bus *bus)
326 322
327/* Calculate the size of the bus and minimal alignment which 323/* Calculate the size of the bus and minimal alignment which
328 guarantees that all child resources fit in this size. */ 324 guarantees that all child resources fit in this size. */
329static int __devinit 325static int pbus_size_mem(struct pci_bus *bus, unsigned long mask, unsigned long type)
330pbus_size_mem(struct pci_bus *bus, unsigned long mask, unsigned long type)
331{ 326{
332 struct pci_dev *dev; 327 struct pci_dev *dev;
333 unsigned long min_align, align, size; 328 unsigned long min_align, align, size;
@@ -447,8 +442,7 @@ pci_bus_size_cardbus(struct pci_bus *bus)
447 } 442 }
448} 443}
449 444
450void __devinit 445void pci_bus_size_bridges(struct pci_bus *bus)
451pci_bus_size_bridges(struct pci_bus *bus)
452{ 446{
453 struct pci_dev *dev; 447 struct pci_dev *dev;
454 unsigned long mask, prefmask; 448 unsigned long mask, prefmask;
@@ -498,8 +492,7 @@ pci_bus_size_bridges(struct pci_bus *bus)
498} 492}
499EXPORT_SYMBOL(pci_bus_size_bridges); 493EXPORT_SYMBOL(pci_bus_size_bridges);
500 494
501void __devinit 495void pci_bus_assign_resources(struct pci_bus *bus)
502pci_bus_assign_resources(struct pci_bus *bus)
503{ 496{
504 struct pci_bus *b; 497 struct pci_bus *b;
505 struct pci_dev *dev; 498 struct pci_dev *dev;
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c
index cb4ced3560e9..6dfd86167e39 100644
--- a/drivers/pci/setup-res.c
+++ b/drivers/pci/setup-res.c
@@ -101,8 +101,7 @@ pci_update_resource(struct pci_dev *dev, struct resource *res, int resno)
101 new & ~PCI_REGION_FLAG_MASK); 101 new & ~PCI_REGION_FLAG_MASK);
102} 102}
103 103
104int __devinit 104int pci_claim_resource(struct pci_dev *dev, int resource)
105pci_claim_resource(struct pci_dev *dev, int resource)
106{ 105{
107 struct resource *res = &dev->resource[resource]; 106 struct resource *res = &dev->resource[resource];
108 struct resource *root = NULL; 107 struct resource *root = NULL;
@@ -212,8 +211,7 @@ EXPORT_SYMBOL_GPL(pci_assign_resource_fixed);
212#endif 211#endif
213 212
214/* Sort resources by alignment */ 213/* Sort resources by alignment */
215void __devinit 214void pdev_sort_resources(struct pci_dev *dev, struct resource_list *head)
216pdev_sort_resources(struct pci_dev *dev, struct resource_list *head)
217{ 215{
218 int i; 216 int i;
219 217