From patchwork Tue Oct 27 16:38:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Nowicki X-Patchwork-Id: 7498211 Return-Path: X-Original-To: patchwork-linux-arm@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 7ECCF9F327 for ; Tue, 27 Oct 2015 16:44:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 88108207C8 for ; Tue, 27 Oct 2015 16:44:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A9271208AF for ; Tue, 27 Oct 2015 16:44:39 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zr7Kz-0001jY-5Y; Tue, 27 Oct 2015 16:43:05 +0000 Received: from mail-lf0-x234.google.com ([2a00:1450:4010:c07::234]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zr7Hq-0006QG-92 for linux-arm-kernel@lists.infradead.org; Tue, 27 Oct 2015 16:39:55 +0000 Received: by lfaz124 with SMTP id z124so175671655lfa.1 for ; Tue, 27 Oct 2015 09:39:28 -0700 (PDT) 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=cLg1nT0F/WWW07wbX28hruJsTNIZGXJnv1zEdDPogUk=; b=YKDAzOiQNBDgu7NallVhsIrWNinG7aDkpE7jO7YAbpBOTzMTiaR7VEdYju6mcYC0i1 yp3SedmCCUPT2l1AJ1xbO9KUGBPWWpp+4IdOYqNzC4k9u+wELAwuDu6jAfbokQdP9OQi CSuRmbro1Ly3akRg+N6q7H+gJKvIs59qu5arp28EWikmxyVFsCybqBZ0oBmYtDLbqdJQ VN+sUR5k4KciZo6P6xPPtoNX793Ia7FBpUMaO0XZKC3+BpuZy49ZqL5sPltzq25fsUiB vUwMv4LtqEFPRBPX0BXY8Dcwc6rFeowvwArWcV8IvsjRLmNR4iPGuKbKhbeQLNBfFtEd 2ANw== 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=cLg1nT0F/WWW07wbX28hruJsTNIZGXJnv1zEdDPogUk=; b=G6q0Vtk6lC1kxJefFUvstzZPWTcpKvtHOU2J6o2UIKUMdi12ipMxOPeR6XTrQTPzyj EpiZ3jAq+5AhL/bHXU6IdWMGzgP/Bh0LNvWRPT5IX9algpd1454HF//yladtz0XUJIf2 BUN8DAbAsK482JGU/5iigkga8CEVEl3ZiV0UvfzEDsLwMdQb+feU+YBTq0xu8vS4yXrz rCrxJDlsVrAF2HZvo2bJ4ZMYCm06SDdQqSKpEOThjPQRnGVMK+jzg2PjP3AFCnIvT9Hu XpS/ZX1yfxbZLSw9ac8HTWBT71t/6WlfqedmMCs/BVCHF/cltdVFRZQ/HdZibu7CG0yR fS/g== X-Gm-Message-State: ALoCoQlMZEf+vY+zGMGDAEajQKmVpO3GWnSO21jijZiKgrWkNOefprWwIHcsNQ3wnV/besz68+Xd X-Received: by 10.25.87.82 with SMTP id l79mr13456287lfb.64.1445963968163; Tue, 27 Oct 2015 09:39:28 -0700 (PDT) Received: from tn-HP-4.semihalf.local ([80.82.22.190]) by smtp.gmail.com with ESMTPSA id kk6sm6988609lbc.48.2015.10.27.09.39.26 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 27 Oct 2015 09:39:27 -0700 (PDT) From: Tomasz Nowicki To: bhelgaas@google.com, arnd@arndb.de, will.deacon@arm.com, catalin.marinas@arm.com, rjw@rjwysocki.net, hanjun.guo@linaro.org, Lorenzo.Pieralisi@arm.com Subject: [PATCH V1 07/11] XEN / PCI: Remove the dependence on arch x86 when PCI_MMCONFIG=y Date: Tue, 27 Oct 2015 17:38:38 +0100 Message-Id: <1445963922-22711-8-git-send-email-tn@semihalf.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1445963922-22711-1-git-send-email-tn@semihalf.com> References: <1445963922-22711-1-git-send-email-tn@semihalf.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151027_093950_670224_08C7B728 X-CRM114-Status: GOOD ( 15.81 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linaro-acpi@lists.linaro.org, Boris Ostrovsky , linux-pci@vger.kernel.org, Konrad Rzeszutek Wilk , Liviu.Dudau@arm.com, ddaney@caviumnetworks.com, Narinder.Dhillon@caviumnetworks.com, linux-acpi@vger.kernel.org, robert.richter@caviumnetworks.com, Suravee.Suthikulpanit@amd.com, msalter@redhat.com, wangyijing@huawei.com, tglx@linutronix.de, jiang.liu@linux.intel.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 From: Hanjun Guo In drivers/xen/pci.c, there are arch x86 dependent codes when CONFIG_PCI_MMCONFIG is enabled, since CONFIG_PCI_MMCONFIG depends on ACPI, so this will prevent XEN PCI running on other architectures using ACPI with PCI_MMCONFIG enabled (such as ARM64). Fortunatly, it can be sloved in a simple way. In drivers/xen/pci.c, the only x86 dependent code is if ((pci_probe & PCI_PROBE_MMCONF) == 0), and it's defined in asm/pci_x86.h, the code means that if the PCI resource is not probed in PCI_PROBE_MMCONF way, just ingnore the xen mcfg init. Actually this is duplicate, because if PCI resource is not probed in PCI_PROBE_MMCONF way, the pci_mmconfig_list will be empty, and the if (list_empty()) after it will do the same job. So just remove the arch related code and the head file, this will be no functional change for x86, and also makes xen/pci.c usable for other architectures. Signed-off-by: Hanjun Guo CC: Konrad Rzeszutek Wilk CC: Boris Ostrovsky Reviewed-by: Boris Ostrovsky --- drivers/xen/pci.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/xen/pci.c b/drivers/xen/pci.c index 6785ebb..9a8dbe3 100644 --- a/drivers/xen/pci.c +++ b/drivers/xen/pci.c @@ -28,9 +28,6 @@ #include #include #include "../pci/pci.h" -#ifdef CONFIG_PCI_MMCONFIG -#include -#endif static bool __read_mostly pci_seg_supported = true; @@ -222,9 +219,6 @@ static int __init xen_mcfg_late(void) if (!xen_initial_domain()) return 0; - if ((pci_probe & PCI_PROBE_MMCONF) == 0) - return 0; - if (list_empty(&pci_mmcfg_list)) return 0;