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: 536735 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 27F72141315 for ; Wed, 28 Oct 2015 03:43:52 +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=YKDAzOiQ; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965169AbbJ0Qjc (ORCPT ); Tue, 27 Oct 2015 12:39:32 -0400 Received: from mail-lf0-f48.google.com ([209.85.215.48]:35283 "EHLO mail-lf0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965107AbbJ0Qj3 (ORCPT ); Tue, 27 Oct 2015 12:39:29 -0400 Received: by lfbn126 with SMTP id n126so140179118lfb.2 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=cJp8AZjP4Xh+vElFRgaZgYS6bJAX1YkxVMUSju9Ca0XI2AhSUv4prkO0Dxu3RfVvX/ HUr1s4ndRHNkuyajrtO9G9vXC8onbBf5jwPkQQrQbtlJO9D/1SEix3lUEU1fCydMVItk enXAppGmrCn1AkzYFvA5TwBwhzwX2oDUycM9+zQm0FHnK7R64+Vlme2KOSr9umeLXgoq bSONuLAw8r5hRTGJwR2EMsdn7+Iyclfu4JHZbWpLerJnZzYq3+b71m4Sf+z9SPbOT68H wIBjz5BeHBfqkm6CQod4fz8HRr9iJA/+DrZ1Z45q6Ev8tfpaUyfvqGX2gwskzsTPCWQF FjBA== X-Gm-Message-State: ALoCoQnun1n4/y/t/ZsloXI8eTHlYEzI222CcTzro+arH+6eEHAE6cCxrlIbrzIaCCLCZXg8ElPw 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 Cc: jiang.liu@linux.intel.com, robert.richter@caviumnetworks.com, Narinder.Dhillon@caviumnetworks.com, ddaney@caviumnetworks.com, Liviu.Dudau@arm.com, tglx@linutronix.de, 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, Konrad Rzeszutek Wilk , Boris Ostrovsky 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> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org 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;