diff options
author | Yinghai Lu <yinghai@kernel.org> | 2013-07-24 17:37:13 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-07-25 14:35:03 -0400 |
commit | ff35147cf15814e13c62831f6910f8663e4dc91e (patch) | |
tree | 3bea0833b463cbea641ecfe2bdf0a790c1e9aa09 /drivers/pci | |
parent | 928bea964827d7824b548c1f8e06eccbbc4d0d7d (diff) |
PCI: Move resource reallocation code to non-__init
Resource reallocation is currently done only at boot-time, but will
soon be done when host bridge is hot-added. This patch removes the
__init annotations so the code will still be present after boot.
[bhelgaas: split __init changes out]
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/setup-bus.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 8f86be13678f..8d1e654256a8 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c | |||
@@ -1297,7 +1297,7 @@ static void pci_bus_dump_resources(struct pci_bus *bus) | |||
1297 | } | 1297 | } |
1298 | } | 1298 | } |
1299 | 1299 | ||
1300 | static int __init pci_bus_get_depth(struct pci_bus *bus) | 1300 | static int pci_bus_get_depth(struct pci_bus *bus) |
1301 | { | 1301 | { |
1302 | int depth = 0; | 1302 | int depth = 0; |
1303 | struct pci_dev *dev; | 1303 | struct pci_dev *dev; |
@@ -1331,7 +1331,7 @@ enum enable_type { | |||
1331 | auto_enabled, | 1331 | auto_enabled, |
1332 | }; | 1332 | }; |
1333 | 1333 | ||
1334 | static enum enable_type pci_realloc_enable __initdata = undefined; | 1334 | static enum enable_type pci_realloc_enable = undefined; |
1335 | void __init pci_realloc_get_opt(char *str) | 1335 | void __init pci_realloc_get_opt(char *str) |
1336 | { | 1336 | { |
1337 | if (!strncmp(str, "off", 3)) | 1337 | if (!strncmp(str, "off", 3)) |
@@ -1339,13 +1339,13 @@ void __init pci_realloc_get_opt(char *str) | |||
1339 | else if (!strncmp(str, "on", 2)) | 1339 | else if (!strncmp(str, "on", 2)) |
1340 | pci_realloc_enable = user_enabled; | 1340 | pci_realloc_enable = user_enabled; |
1341 | } | 1341 | } |
1342 | static bool __init pci_realloc_enabled(enum enable_type enable) | 1342 | static bool pci_realloc_enabled(enum enable_type enable) |
1343 | { | 1343 | { |
1344 | return enable >= user_enabled; | 1344 | return enable >= user_enabled; |
1345 | } | 1345 | } |
1346 | 1346 | ||
1347 | #if defined(CONFIG_PCI_IOV) && defined(CONFIG_PCI_REALLOC_ENABLE_AUTO) | 1347 | #if defined(CONFIG_PCI_IOV) && defined(CONFIG_PCI_REALLOC_ENABLE_AUTO) |
1348 | static int __init iov_resources_unassigned(struct pci_dev *dev, void *data) | 1348 | static int iov_resources_unassigned(struct pci_dev *dev, void *data) |
1349 | { | 1349 | { |
1350 | int i; | 1350 | int i; |
1351 | bool *unassigned = data; | 1351 | bool *unassigned = data; |
@@ -1368,7 +1368,7 @@ static int __init iov_resources_unassigned(struct pci_dev *dev, void *data) | |||
1368 | return 0; | 1368 | return 0; |
1369 | } | 1369 | } |
1370 | 1370 | ||
1371 | static enum enable_type __init pci_realloc_detect(struct pci_bus *bus, | 1371 | static enum enable_type pci_realloc_detect(struct pci_bus *bus, |
1372 | enum enable_type enable_local) | 1372 | enum enable_type enable_local) |
1373 | { | 1373 | { |
1374 | bool unassigned = false; | 1374 | bool unassigned = false; |
@@ -1383,7 +1383,7 @@ static enum enable_type __init pci_realloc_detect(struct pci_bus *bus, | |||
1383 | return enable_local; | 1383 | return enable_local; |
1384 | } | 1384 | } |
1385 | #else | 1385 | #else |
1386 | static enum enable_type __init pci_realloc_detect(struct pci_bus *bus, | 1386 | static enum enable_type pci_realloc_detect(struct pci_bus *bus, |
1387 | enum enable_type enable_local) | 1387 | enum enable_type enable_local) |
1388 | { | 1388 | { |
1389 | return enable_local; | 1389 | return enable_local; |
@@ -1395,8 +1395,7 @@ static enum enable_type __init pci_realloc_detect(struct pci_bus *bus, | |||
1395 | * second and later try will clear small leaf bridge res | 1395 | * second and later try will clear small leaf bridge res |
1396 | * will stop till to the max deepth if can not find good one | 1396 | * will stop till to the max deepth if can not find good one |
1397 | */ | 1397 | */ |
1398 | static void __init | 1398 | static void pci_assign_unassigned_root_bus_resources(struct pci_bus *bus) |
1399 | pci_assign_unassigned_root_bus_resources(struct pci_bus *bus) | ||
1400 | { | 1399 | { |
1401 | LIST_HEAD(realloc_head); /* list of resources that | 1400 | LIST_HEAD(realloc_head); /* list of resources that |
1402 | want additional resources */ | 1401 | want additional resources */ |