From patchwork Thu Feb 4 17:28:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Nowicki X-Patchwork-Id: 579059 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 56713140324 for ; Fri, 5 Feb 2016 04:34:59 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=semihalf-com.20150623.gappssmtp.com header.i=@semihalf-com.20150623.gappssmtp.com header.b=SyeyiH5e; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966151AbcBDR3R (ORCPT ); Thu, 4 Feb 2016 12:29:17 -0500 Received: from mail-wm0-f50.google.com ([74.125.82.50]:37961 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966091AbcBDR3I (ORCPT ); Thu, 4 Feb 2016 12:29:08 -0500 Received: by mail-wm0-f50.google.com with SMTP id p63so127748239wmp.1 for ; Thu, 04 Feb 2016 09:29:07 -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=tikjy1dP+/fgPdalg4uROByNNamUPRBz5WlbCUB7Sok=; b=SyeyiH5eZgecZFjrBRIVQuaXY4zfLpe9+j9qyxyVkeJUOshGFZvROOm+HojcFaWunz dikuL2xY0s1VTSffRlrs7rdB7ZTTR5/9l5kXH6o0VE52B7WODWNzgx+KYYu8yHPSi+/u zehHme1KGyzANkDMOxBHxVJqJuPM6S2LLAK4Ztjd9gIPdEN0VxkUd6QcIYnTC4LHHHZL g/Y+LvKsuEQUMulwH3gz0Mh2uDKdZYtrfaw3FSvc0V7+g8qHq75bW50+C58RJSQooOB9 dwA0LkecX9E4k99UySAbUHyLQ1gfT+t7aqgpq8IclGe3edKeUhuoXXIJ68uolhV3OH3Y UAVw== 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=tikjy1dP+/fgPdalg4uROByNNamUPRBz5WlbCUB7Sok=; b=KGmAdBwkm2QeB8gQbTMDHxqZ358ZMD/y6JNiQkPwTx8eykp/HDbgG+cAlkHRw9sekJ tK1shipOkUIB2sf1KiOrPh/jQwWjzldP38IOaXpXcffdEzKsZxskjHTZ+zdS4PGdkdO2 jnR4HWKh9EGiUuj2WFLVLtt/LmmXRqzjtMnSsOF/GXrf3G1ScbpuVHZ3shKx2EzOnGew RY9O18iqWAqDwhvYeyPv5ePp4rm4bV7lHsoSBvXev7b0Y/hz+YGRmGzlOYN40ug8ofzb QOqghHNqRlguMwBNWIK+gEfx8hUrDh5hHo0QkrkoYHZbe/gT1XKU+XW1mjKjElNCODCU df9Q== X-Gm-Message-State: AG10YOR0aZlO4RQx0tRKG6Kf8DyOgc8mirZG7ONU6xMW5DxEXtSOV6kajwSB+FeTqpIHMw== X-Received: by 10.194.21.101 with SMTP id u5mr10955733wje.53.1454606946856; Thu, 04 Feb 2016 09:29:06 -0800 (PST) Received: from tn-HP-4.semihalf.local (cardhu.semihalf.com. [213.17.239.108]) by smtp.gmail.com with ESMTPSA id w8sm12238889wjx.21.2016.02.04.09.29.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 04 Feb 2016 09:29:06 -0800 (PST) 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, okaya@codeaurora.org, jiang.liu@linux.intel.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, jchandra@broadcom.com, jcm@redhat.com, Tomasz Nowicki , Konrad Rzeszutek Wilk , Boris Ostrovsky Subject: [PATCH V4 06/23] XEN / PCI: Remove the dependence on arch x86 when PCI_MMCONFIG=y Date: Thu, 4 Feb 2016 18:28:44 +0100 Message-Id: <1454606941-9523-7-git-send-email-tn@semihalf.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1454606941-9523-1-git-send-email-tn@semihalf.com> References: <1454606941-9523-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 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 Cc: Stefano Stabellini 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: Boris Ostrovsky Acked-by: Stefano Stabellini --- 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;