From patchwork Tue Feb 16 13:53:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Nowicki X-Patchwork-Id: 8326271 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EAF289F38B for ; Tue, 16 Feb 2016 13:59:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0738E20263 for ; Tue, 16 Feb 2016 13:59:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 38058202B8 for ; Tue, 16 Feb 2016 13:59:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932471AbcBPNyA (ORCPT ); Tue, 16 Feb 2016 08:54:00 -0500 Received: from mail-wm0-f45.google.com ([74.125.82.45]:32852 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932534AbcBPNx5 (ORCPT ); Tue, 16 Feb 2016 08:53:57 -0500 Received: by mail-wm0-f45.google.com with SMTP id g62so192672750wme.0 for ; Tue, 16 Feb 2016 05:53:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+f0DWq5ufmp0V5PobwQ7coWrMmGKbcSqsHYMm3wCe0E=; b=aTVFjLlnlUJKvG+rXBA1Glo0fJjU/xWOij7XgRVJbl/FpLVGO0p2h5+xsgXcRn44j0 PtN+j3FaBviz3Ds1vDMbu0ATUPaKTx0XiqCTIbbsAdsp5vdO2x1vbYLqL8UJsL8eBrIp SuEjkKzH1z5OG39IZ1/wYp8F3PDGE92c2ubsLM3uT5pblE9+67ROzzoxVK1JSQfD3MhB mk3Efp0zwlRwpI5uUQNgZxWvIJqQYkzfUdTrVlzb3+8Aah3cMDT6gz44cIeRDVnWsLHG NGBaojqNhkLWxTtTqh5542hL3Ua+KtLy2V4UuOKPECl7MRYMpcW8P2GdNBRRqEMOSEhJ 570A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=+f0DWq5ufmp0V5PobwQ7coWrMmGKbcSqsHYMm3wCe0E=; b=BSw++W6ZYrvK3AybaArRxnE4O6mhEleA/zcwkWsD8WUJWr+DVcPz2XMWi5rn/b8ipn qqr/MQPmbm3ol6hVIsMVj4zfcvbUMlrIuniMob7yFquZLk0uqPUlYCljFAfJBxhIzXqX Ps22bEispfVH509vPPY04J1DAkwFlFgoZfFFWX001Y1uoijXUeEMDCKPXHRdlcwCrC+E LbaJvMPJq0oyWtTf9OkZGZLIIFVFtxxeFC8hR5AsH/5S03z9wobpBQ9//oN3FuGhf52x zmS/W4RvQhKJ2UMfi7Zpi7VVm8n7wG7fkAEuKXs3voMLNvdUIPnO9xcPeD/oG85uM1io woZQ== X-Gm-Message-State: AG10YORswvmcHDJRxY8bOyNoMgj6DeR4WtM5XcwG6jiPkN5sPGL6IcMFwTcrLDyVfYOz3A== X-Received: by 10.28.179.130 with SMTP id c124mr19766326wmf.76.1455630836096; Tue, 16 Feb 2016 05:53:56 -0800 (PST) Received: from tn-HP-4.semihalf.local ([80.82.22.190]) by smtp.gmail.com with ESMTPSA id q129sm20833462wmd.14.2016.02.16.05.53.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Feb 2016 05:53:55 -0800 (PST) From: Tomasz Nowicki To: helgaas@kernel.org, arnd@arndb.de, will.deacon@arm.com, catalin.marinas@arm.com, rafael@kernel.org, hanjun.guo@linaro.org, Lorenzo.Pieralisi@arm.com, okaya@codeaurora.org, jiang.liu@linux.intel.com, jchandra@broadcom.com, Stefano.Stabellini@eu.citrix.com Cc: robert.richter@caviumnetworks.com, mw@semihalf.com, Liviu.Dudau@arm.com, ddaney@caviumnetworks.com, wangyijing@huawei.com, Suravee.Suthikulpanit@amd.com, msalter@redhat.com, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linaro-acpi@lists.linaro.org, jcm@redhat.com, Tomasz Nowicki Subject: [PATCH V5 02/15] acpi, pci, mcfg: Provide default RAW ACPI PCI config space accessors. Date: Tue, 16 Feb 2016 14:53:32 +0100 Message-Id: <1455630825-27253-3-git-send-email-tn@semihalf.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455630825-27253-1-git-send-email-tn@semihalf.com> References: <1455630825-27253-1-git-send-email-tn@semihalf.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Lets keep RAW ACPI PCI config space accessors empty by default, since we are note sure if they are necessary accross all archs. Once we sort this out, we can provide generic version or let architectures to overwrite, like now x86. Suggested-by: Lorenzo Pieralisi Signed-off-by: Tomasz Nowicki Tested-by: Suravee Suthikulpanit Tested-by: Jeremy Linton Tested-by: Duc Dang Tested-by: Dongdong Liu Tested-by: Hanjun Guo Tested-by: Graeme Gregory Tested-by: Sinan Kaya Reviewed-by: Lorenzo Pieralisi --- drivers/acpi/pci_mcfg.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/acpi/pci_mcfg.c b/drivers/acpi/pci_mcfg.c index ea84365..0467b00 100644 --- a/drivers/acpi/pci_mcfg.c +++ b/drivers/acpi/pci_mcfg.c @@ -21,6 +21,26 @@ static DEFINE_MUTEX(pci_mmcfg_lock); LIST_HEAD(pci_mmcfg_list); +/* + * raw_pci_read/write - raw ACPI PCI config space accessors. + * + * By defauly (__weak) these accessors are empty and should be overwritten + * by architectures which support operations on ACPI PCI_Config regions, + * see osl.c file. + */ + +int __weak raw_pci_read(unsigned int domain, unsigned int bus, + unsigned int devfn, int reg, int len, u32 *val) +{ + return PCIBIOS_DEVICE_NOT_FOUND; +} + +int __weak raw_pci_write(unsigned int domain, unsigned int bus, + unsigned int devfn, int reg, int len, u32 val) +{ + return PCIBIOS_DEVICE_NOT_FOUND; +} + static void list_add_sorted(struct pci_mmcfg_region *new) { struct pci_mmcfg_region *cfg;