diff options
author | David S. Miller <davem@davemloft.net> | 2019-05-02 22:14:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-02 22:14:21 -0400 |
commit | ff24e4980a68d83090a02fda081741a410fe8eef (patch) | |
tree | 4d874dfcaf2bb8c3abc2446af9447a983402c0ae /drivers/pci/pci.c | |
parent | 26f146ed971c0e4a264ce525d7a66a71ef73690d (diff) | |
parent | ea9866793d1e925b4d320eaea409263b2a568f38 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Three trivial overlapping conflicts.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r-- | drivers/pci/pci.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 7c1b362f599a..766f5779db92 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -6262,8 +6262,7 @@ static int __init pci_setup(char *str) | |||
6262 | } else if (!strncmp(str, "pcie_scan_all", 13)) { | 6262 | } else if (!strncmp(str, "pcie_scan_all", 13)) { |
6263 | pci_add_flags(PCI_SCAN_ALL_PCIE_DEVS); | 6263 | pci_add_flags(PCI_SCAN_ALL_PCIE_DEVS); |
6264 | } else if (!strncmp(str, "disable_acs_redir=", 18)) { | 6264 | } else if (!strncmp(str, "disable_acs_redir=", 18)) { |
6265 | disable_acs_redir_param = | 6265 | disable_acs_redir_param = str + 18; |
6266 | kstrdup(str + 18, GFP_KERNEL); | ||
6267 | } else { | 6266 | } else { |
6268 | printk(KERN_ERR "PCI: Unknown option `%s'\n", | 6267 | printk(KERN_ERR "PCI: Unknown option `%s'\n", |
6269 | str); | 6268 | str); |
@@ -6274,3 +6273,19 @@ static int __init pci_setup(char *str) | |||
6274 | return 0; | 6273 | return 0; |
6275 | } | 6274 | } |
6276 | early_param("pci", pci_setup); | 6275 | early_param("pci", pci_setup); |
6276 | |||
6277 | /* | ||
6278 | * 'disable_acs_redir_param' is initialized in pci_setup(), above, to point | ||
6279 | * to data in the __initdata section which will be freed after the init | ||
6280 | * sequence is complete. We can't allocate memory in pci_setup() because some | ||
6281 | * architectures do not have any memory allocation service available during | ||
6282 | * an early_param() call. So we allocate memory and copy the variable here | ||
6283 | * before the init section is freed. | ||
6284 | */ | ||
6285 | static int __init pci_realloc_setup_params(void) | ||
6286 | { | ||
6287 | disable_acs_redir_param = kstrdup(disable_acs_redir_param, GFP_KERNEL); | ||
6288 | |||
6289 | return 0; | ||
6290 | } | ||
6291 | pure_initcall(pci_realloc_setup_params); | ||