Message ID | 1425987320-15020-6-git-send-email-tomasz.nowicki@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBCAJBLWG2ANBB4VN7OTQKGQEKCULMRQ@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 28D35214BF for <linaro@patches.linaro.org>; Tue, 10 Mar 2015 11:35:15 +0000 (UTC) Received: by wggx13 with SMTP id x13sf829330wgg.0 for <linaro@patches.linaro.org>; Tue, 10 Mar 2015 04:35:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=Mfib4QJD9Sdl1OSwkzTR9gHu869yZ8wPjL9Z1GKtPrQ=; b=exNQ6EQcU/8qpC3YDk68ibTiVzpfohXaQmBGOKUdMN8BHDxS6JPZ6XH7s9wqNggRiN AeblazhAgUL6a5RV2mIVC8E4Vbi+59BdAscRxF7iaV4Pv5vBGVt7HutfYLbaERS1DK/+ WEuKEFBmz6j9CDXjWlTMxfOa/XAfADPRjSmmMtsPLstN/H+7oEndkIZY4J8XO7KNznkP QJAPES6pmCIFl/za67hgdPloXgRkHQfXZ1ooJgdOG8uy/3Y8mOnR2XzH9js68XfP03WB 9YFTeM/2hd3YI1k+nJFi/gj45l4P0RiwN/mXESFRlFQivup5vpXj+01F7CNOSh1tcimh BKSw== X-Gm-Message-State: ALoCoQnt0urr/Idsb82wzDhoz4WKS7DwuvuCpSBWmv8jVn/2cZX53ooS7sV3D7gKVGOorNaDYRfv X-Received: by 10.112.98.38 with SMTP id ef6mr3858004lbb.3.1425987314477; Tue, 10 Mar 2015 04:35:14 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.204.69 with SMTP id kw5ls10781lac.86.gmail; Tue, 10 Mar 2015 04:35:14 -0700 (PDT) X-Received: by 10.152.43.102 with SMTP id v6mr23952499lal.1.1425987314154; Tue, 10 Mar 2015 04:35:14 -0700 (PDT) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id qa10si130651lbb.109.2015.03.10.04.35.14 for <patchwork-forward@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Mar 2015 04:35:14 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by lamq1 with SMTP id q1so910005lam.12 for <patchwork-forward@linaro.org>; Tue, 10 Mar 2015 04:35:14 -0700 (PDT) X-Received: by 10.112.201.231 with SMTP id kd7mr9253921lbc.35.1425987314019; Tue, 10 Mar 2015 04:35:14 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp2064180lbj; Tue, 10 Mar 2015 04:35:12 -0700 (PDT) X-Received: by 10.70.30.162 with SMTP id t2mr61031906pdh.142.1425987310568; Tue, 10 Mar 2015 04:35:10 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w10si349293pas.114.2015.03.10.04.35.09; Tue, 10 Mar 2015 04:35:10 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752931AbbCJLe6 (ORCPT <rfc822;ivan.khoronzhuk@linaro.org> + 28 others); Tue, 10 Mar 2015 07:34:58 -0400 Received: from mail-la0-f45.google.com ([209.85.215.45]:39191 "EHLO mail-la0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751161AbbCJLes (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 10 Mar 2015 07:34:48 -0400 Received: by labgd6 with SMTP id gd6so955638lab.6 for <linux-kernel@vger.kernel.org>; Tue, 10 Mar 2015 04:34:46 -0700 (PDT) X-Received: by 10.112.92.66 with SMTP id ck2mr29825174lbb.105.1425987286794; Tue, 10 Mar 2015 04:34:46 -0700 (PDT) Received: from tn-HP-4.semihalf.com (cardhu.semihalf.com. [213.17.239.108]) by mx.google.com with ESMTPSA id n12sm57206lbg.31.2015.03.10.04.34.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 Mar 2015 04:34:46 -0700 (PDT) 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 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 v3 5/9] pci, acpi, mcfg: Provide generic implementation of MCFG code initialization. Date: Tue, 10 Mar 2015 12:35:16 +0100 Message-Id: <1425987320-15020-6-git-send-email-tomasz.nowicki@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1425987320-15020-1-git-send-email-tomasz.nowicki@linaro.org> References: <1425987320-15020-1-git-send-email-tomasz.nowicki@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: <patchwork-forward.linaro.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: tomasz.nowicki@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> |
diff --git a/drivers/acpi/mcfg.c b/drivers/acpi/mcfg.c index a2e2326..1e646fc 100644 --- a/drivers/acpi/mcfg.c +++ b/drivers/acpi/mcfg.c @@ -79,3 +79,23 @@ int __init acpi_parse_mcfg(struct acpi_table_header *header) 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); +}
Those 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 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)