提交 ff35147c 编写于 作者: Y Yinghai Lu 提交者: Bjorn Helgaas

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: NYinghai Lu <yinghai@kernel.org>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
上级 928bea96
...@@ -1297,7 +1297,7 @@ static void pci_bus_dump_resources(struct pci_bus *bus) ...@@ -1297,7 +1297,7 @@ static void pci_bus_dump_resources(struct pci_bus *bus)
} }
} }
static int __init pci_bus_get_depth(struct pci_bus *bus) static int pci_bus_get_depth(struct pci_bus *bus)
{ {
int depth = 0; int depth = 0;
struct pci_dev *dev; struct pci_dev *dev;
...@@ -1331,7 +1331,7 @@ enum enable_type { ...@@ -1331,7 +1331,7 @@ enum enable_type {
auto_enabled, auto_enabled,
}; };
static enum enable_type pci_realloc_enable __initdata = undefined; static enum enable_type pci_realloc_enable = undefined;
void __init pci_realloc_get_opt(char *str) void __init pci_realloc_get_opt(char *str)
{ {
if (!strncmp(str, "off", 3)) if (!strncmp(str, "off", 3))
...@@ -1339,13 +1339,13 @@ void __init pci_realloc_get_opt(char *str) ...@@ -1339,13 +1339,13 @@ void __init pci_realloc_get_opt(char *str)
else if (!strncmp(str, "on", 2)) else if (!strncmp(str, "on", 2))
pci_realloc_enable = user_enabled; pci_realloc_enable = user_enabled;
} }
static bool __init pci_realloc_enabled(enum enable_type enable) static bool pci_realloc_enabled(enum enable_type enable)
{ {
return enable >= user_enabled; return enable >= user_enabled;
} }
#if defined(CONFIG_PCI_IOV) && defined(CONFIG_PCI_REALLOC_ENABLE_AUTO) #if defined(CONFIG_PCI_IOV) && defined(CONFIG_PCI_REALLOC_ENABLE_AUTO)
static int __init iov_resources_unassigned(struct pci_dev *dev, void *data) static int iov_resources_unassigned(struct pci_dev *dev, void *data)
{ {
int i; int i;
bool *unassigned = data; bool *unassigned = data;
...@@ -1368,7 +1368,7 @@ static int __init iov_resources_unassigned(struct pci_dev *dev, void *data) ...@@ -1368,7 +1368,7 @@ static int __init iov_resources_unassigned(struct pci_dev *dev, void *data)
return 0; return 0;
} }
static enum enable_type __init pci_realloc_detect(struct pci_bus *bus, static enum enable_type pci_realloc_detect(struct pci_bus *bus,
enum enable_type enable_local) enum enable_type enable_local)
{ {
bool unassigned = false; bool unassigned = false;
...@@ -1383,7 +1383,7 @@ static enum enable_type __init pci_realloc_detect(struct pci_bus *bus, ...@@ -1383,7 +1383,7 @@ static enum enable_type __init pci_realloc_detect(struct pci_bus *bus,
return enable_local; return enable_local;
} }
#else #else
static enum enable_type __init pci_realloc_detect(struct pci_bus *bus, static enum enable_type pci_realloc_detect(struct pci_bus *bus,
enum enable_type enable_local) enum enable_type enable_local)
{ {
return enable_local; return enable_local;
...@@ -1395,8 +1395,7 @@ static enum enable_type __init pci_realloc_detect(struct pci_bus *bus, ...@@ -1395,8 +1395,7 @@ static enum enable_type __init pci_realloc_detect(struct pci_bus *bus,
* second and later try will clear small leaf bridge res * second and later try will clear small leaf bridge res
* will stop till to the max deepth if can not find good one * will stop till to the max deepth if can not find good one
*/ */
static void __init static void pci_assign_unassigned_root_bus_resources(struct pci_bus *bus)
pci_assign_unassigned_root_bus_resources(struct pci_bus *bus)
{ {
LIST_HEAD(realloc_head); /* list of resources that LIST_HEAD(realloc_head); /* list of resources that
want additional resources */ want additional resources */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册