From: Tomasz Nowicki <tomasz.nowicki@linaro.org>
To: bhelgaas@google.com, wangyijing@huawei.com, arnd@arndb.de,
hanjun.guo@linaro.org, Liviu.Dudau@arm.com, tglx@linutronix.de,
mingo@redhat.com, hpa@zytor.com, rjw@rjwysocki.net,
al.stone@linaro.org, lorenzo.pieralisi@arm.com
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, x86@kernel.org,
linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org,
linaro-acpi@lists.linaro.org,
Tomasz Nowicki <tomasz.nowicki@linaro.org>
Subject: [PATCH v5 5/9] pci, acpi, mcfg: Provide generic implementation of MCFG code initialization.
Date: Fri, 17 Apr 2015 09:14:54 +0200 [thread overview]
Message-ID: <1429254898-32743-6-git-send-email-tomasz.nowicki@linaro.org> (raw)
In-Reply-To: <1429254898-32743-1-git-send-email-tomasz.nowicki@linaro.org>
First function acpi_mcfg_check_entry() does not apply any quirks by default.
Last two functions are required by ACPI subsystem to make PCI config
space accessible. Generic code assume to do nothing for early init call but
late init call does as follow:
- parse MCFG table and add regions to ECAM resource list
- map regions
- add regions to iomem_resource
Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
---
drivers/acpi/mcfg.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/drivers/acpi/mcfg.c b/drivers/acpi/mcfg.c
index a9338df9..787defe 100644
--- a/drivers/acpi/mcfg.c
+++ b/drivers/acpi/mcfg.c
@@ -55,3 +55,29 @@ int __init acpi_parse_mcfg(struct acpi_table_header *header)
return 0;
}
+
+int __init __weak acpi_mcfg_check_entry(struct acpi_table_mcfg *mcfg,
+ struct acpi_mcfg_allocation *cfg)
+{
+ return 0;
+}
+
+void __init __weak pci_mmcfg_early_init(void)
+{
+
+}
+
+void __init __weak pci_mmcfg_late_init(void)
+{
+ struct pci_mmcfg_region *cfg;
+
+ acpi_table_parse(ACPI_SIG_MCFG, acpi_parse_mcfg);
+
+ if (list_empty(&pci_mmcfg_list))
+ return;
+ if (!pci_mmcfg_arch_init())
+ free_all_mmcfg();
+
+ list_for_each_entry(cfg, &pci_mmcfg_list, list)
+ insert_resource(&iomem_resource, &cfg->res);
+}
--
1.9.1
next prev parent reply other threads:[~2015-04-17 7:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-17 7:14 [PATCH v5 0/9] PCI: MMCONFIG clean up Tomasz Nowicki
2015-04-17 7:14 ` [PATCH v5 1/9] x86, pci: Clean up comment about buggy MMIO config space access for AMD Fam10h CPUs Tomasz Nowicki
2015-04-17 7:14 ` [PATCH v5 2/9] x86, pci: Abstract PCI config accessors and use AMD Fam10h workaround exclusively Tomasz Nowicki
2015-04-17 7:14 ` [PATCH v5 3/9] x86, pci: Reorder logic of pci_mmconfig_insert() function Tomasz Nowicki
2015-04-17 7:14 ` [PATCH v5 4/9] x86, pci, acpi: Move arch-agnostic MMCONFIG (aka ECAM) and ACPI code out of arch/x86/ directory Tomasz Nowicki
2015-04-17 7:14 ` Tomasz Nowicki [this message]
2015-04-17 7:14 ` [PATCH v5 6/9] x86, pci: mmconfig_{32,64}.c code refactoring - remove code duplication Tomasz Nowicki
2015-04-17 7:14 ` [PATCH v5 7/9] x86, pci, ecam: mmconfig_64.c becomes default implementation for ECAM driver Tomasz Nowicki
2015-04-17 7:14 ` [PATCH v5 8/9] pci, acpi, mcfg: Share ACPI PCI config space accessors Tomasz Nowicki
2015-04-17 7:14 ` [PATCH v5 9/9] pci, ecam: Improve naming for ecam.c content and areas where it is used Tomasz Nowicki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1429254898-32743-6-git-send-email-tomasz.nowicki@linaro.org \
--to=tomasz.nowicki@linaro.org \
--cc=Liviu.Dudau@arm.com \
--cc=al.stone@linaro.org \
--cc=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=hanjun.guo@linaro.org \
--cc=hpa@zytor.com \
--cc=linaro-acpi@lists.linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=mingo@redhat.com \
--cc=rjw@rjwysocki.net \
--cc=tglx@linutronix.de \
--cc=wangyijing@huawei.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).