Message ID | 1426083169-8698-6-git-send-email-tomasz.nowicki@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBCAJBLWG2ANBBE44QGUAKGQEQM6FS5I@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E8FB7214BF for <linaro@patches.linaro.org>; Wed, 11 Mar 2015 14:15:47 +0000 (UTC) Received: by wggx13 with SMTP id x13sf6838460wgg.0 for <linaro@patches.linaro.org>; Wed, 11 Mar 2015 07:15:47 -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=CQzMCSgUM/EBQKxw1SY/4KxO3QOMI4usYJ6twAwFJ9Y8xaqQRjLA1i6ZGBl4gL+SWY S3tSyfTMs/Qgmt0wj+Dr443Wy2WCqHCNzrAX5YRmMAAE5ugsN4yfLZar8RRgqXTJnKap O2BHyPlWoabpkeMKHa+kE3D2GVpRn+Om+In9zcrmdtljiS2ysXYI+6VoEdhWplU/o+c6 U5zQmA/2j+mjU0/ZfdYGyreUqJfRf3OapjN69YQKnB8j78br7QJtU/G/B5xEBqZbno9u 5s600GXd11qRER1AdHOuNzzb7OmfInyUcP7wyGx/iQjpF8/8uwoFst3MMkonWVbuCe/9 OiQg== X-Gm-Message-State: ALoCoQnFdbUS6LvR53c1EOXH2xdWg87ias0H85miFE/RDvyAP/TKaqCPckxyu1Joyi4V16eCiZlj X-Received: by 10.180.13.195 with SMTP id j3mr8695854wic.2.1426083347285; Wed, 11 Mar 2015 07:15:47 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.4.131 with SMTP id k3ls167290lak.21.gmail; Wed, 11 Mar 2015 07:15:46 -0700 (PDT) X-Received: by 10.152.219.2 with SMTP id pk2mr34313147lac.107.1426083346961; Wed, 11 Mar 2015 07:15:46 -0700 (PDT) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com. [209.85.217.173]) by mx.google.com with ESMTPS id ay11si1696890lab.50.2015.03.11.07.15.46 for <patchwork-forward@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Mar 2015 07:15:46 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by lbvp9 with SMTP id p9so9117098lbv.10 for <patchwork-forward@linaro.org>; Wed, 11 Mar 2015 07:15:46 -0700 (PDT) X-Received: by 10.152.22.67 with SMTP id b3mr34132622laf.117.1426083346761; Wed, 11 Mar 2015 07:15:46 -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 h5csp2807277lbj; Wed, 11 Mar 2015 07:15:46 -0700 (PDT) X-Received: by 10.66.63.7 with SMTP id c7mr79299910pas.13.1426083345022; Wed, 11 Mar 2015 07:15:45 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y4si7179871pdy.206.2015.03.11.07.15.43; Wed, 11 Mar 2015 07:15:45 -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 S1753465AbbCKOPl (ORCPT <rfc822;ivan.khoronzhuk@linaro.org> + 28 others); Wed, 11 Mar 2015 10:15:41 -0400 Received: from mail-lb0-f177.google.com ([209.85.217.177]:37550 "EHLO mail-lb0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752242AbbCKOMq (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 11 Mar 2015 10:12:46 -0400 Received: by lbdu10 with SMTP id u10so9102346lbd.4 for <linux-kernel@vger.kernel.org>; Wed, 11 Mar 2015 07:12:44 -0700 (PDT) X-Received: by 10.152.234.108 with SMTP id ud12mr15116242lac.81.1426083164856; Wed, 11 Mar 2015 07:12:44 -0700 (PDT) Received: from tn-HP-4.semihalf.com (cardhu.semihalf.com. [213.17.239.108]) by mx.google.com with ESMTPSA id x4sm746600lba.22.2015.03.11.07.12.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 11 Mar 2015 07:12:44 -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 v4 5/9] pci, acpi, mcfg: Provide generic implementation of MCFG code initialization. Date: Wed, 11 Mar 2015 15:12:45 +0100 Message-Id: <1426083169-8698-6-git-send-email-tomasz.nowicki@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1426083169-8698-1-git-send-email-tomasz.nowicki@linaro.org> References: <1426083169-8698-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.217.173 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(+)