[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1454606941-9523-17-git-send-email-tn@semihalf.com>
Date: Thu, 4 Feb 2016 18:28:54 +0100
From: Tomasz Nowicki <tn@...ihalf.com>
To: bhelgaas@...gle.com, arnd@...db.de, will.deacon@....com,
catalin.marinas@....com, rjw@...ysocki.net, hanjun.guo@...aro.org,
Lorenzo.Pieralisi@....com, okaya@...eaurora.org,
jiang.liu@...ux.intel.com, Stefano.Stabellini@...citrix.com
Cc: robert.richter@...iumnetworks.com, mw@...ihalf.com,
Liviu.Dudau@....com, ddaney@...iumnetworks.com,
wangyijing@...wei.com, Suravee.Suthikulpanit@....com,
msalter@...hat.com, linux-pci@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-acpi@...r.kernel.org,
linux-kernel@...r.kernel.org, linaro-acpi@...ts.linaro.org,
jchandra@...adcom.com, jcm@...hat.com,
Tomasz Nowicki <tn@...ihalf.com>
Subject: [PATCH V4 16/23] x86, acpi, pci: Use equivalent function from mcfg.c driver.
Since mcfg.c driver provides the same function lets use it and remove
code duplication.
Signed-off-by: Tomasz Nowicki <tn@...ihalf.com>
Tested-by: Duc Dang <dhdang@....com>
Tested-by: Dongdong Liu <liudongdong3@...wei.com>
Tested-by: Hanjun Guo <hanjun.guo@...aro.org>
Tested-by: Graeme Gregory <graeme.gregory@...aro.org>
Tested-by: Sinan Kaya <okaya@...eaurora.org>
---
arch/x86/pci/acpi.c | 20 +-------------------
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c
index d5086d1..b4e72b5 100644
--- a/arch/x86/pci/acpi.c
+++ b/arch/x86/pci/acpi.c
@@ -201,29 +201,11 @@ static int setup_mcfg_map(struct acpi_pci_root_info *ci)
return 0;
}
-
-static void teardown_mcfg_map(struct acpi_pci_root_info *ci)
-{
- struct acpi_pci_root *root = ci->root;
- struct pci_mmcfg_region *cfg;
-
- cfg = pci_mmconfig_lookup(root->segment, root->secondary.start);
- if (!cfg)
- return;
-
- if (cfg->hot_added)
- pci_mmconfig_delete(root->segment, root->secondary.start,
- root->secondary.end);
-}
#else
static int setup_mcfg_map(struct acpi_pci_root_info *ci)
{
return 0;
}
-
-static void teardown_mcfg_map(struct acpi_pci_root_info *ci)
-{
-}
#endif
static int pci_acpi_root_get_node(struct acpi_pci_root *root)
@@ -251,7 +233,7 @@ static int pci_acpi_root_init_info(struct acpi_pci_root_info *ci)
static void pci_acpi_root_release_info(struct acpi_pci_root_info *ci)
{
- teardown_mcfg_map(ci);
+ pci_mmcfg_teardown_map(ci);
kfree(container_of(ci, struct pci_root_info, common));
}
--
1.9.1
Powered by blists - more mailing lists