From patchwork Tue May 26 12:49:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 48985 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 464422121F for ; Tue, 26 May 2015 12:57:17 +0000 (UTC) Received: by lami4 with SMTP id i4sf27968651lam.3 for ; Tue, 26 May 2015 05:57:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :content-type:content-transfer-encoding:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list; bh=AUXlC9AM1f//n9dzqrrNMHGujxBy1VFyXpQYNgL+WA4=; b=KQgnjfDueIenb2FGP3Qgy9Ngpn6pzDQeOd5SL1bBsCGJEQFjNWA2rYy2FtF1RfBuJN kmw3Rep+7LOJ4vkRwi8Svt7RhHQeR/zxl7fbTRpzvnbfUOU/QvgPLTNaxIImaZFP6UCs JpI+Tden2XV1UEgQrERs9DPGX81WNGtRS/xf/n0UgMP3mauK2SGYq9Ck5RNK+1eqwo2P 2NsN0y/QTTCwoxWttPpmd2IUNWqtc/basdpZbdHMjiV2uM0DaGiU8nnUomgdRlQkJ9mD d89Qom6TE1gtkbqOO9oXEKoIXCQnGkz3nSl1p4UP27qlJ0NsA98YAYFvbKuwiJ9UjsUi Lbtw== X-Gm-Message-State: ALoCoQkVs4m4janCJM4ZKQF4l6I4H/Lkkdlg2iQ2FIqR096Zi9YZwa10/+LtbOlYQsifXCTcm7SM X-Received: by 10.112.162.228 with SMTP id yd4mr27226909lbb.8.1432645035947; Tue, 26 May 2015 05:57:15 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.204.168 with SMTP id kz8ls718041lac.105.gmail; Tue, 26 May 2015 05:57:15 -0700 (PDT) X-Received: by 10.152.246.34 with SMTP id xt2mr22689704lac.110.1432645035680; Tue, 26 May 2015 05:57:15 -0700 (PDT) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id wj6si10903577lbb.87.2015.05.26.05.57.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 May 2015 05:57:15 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by labbd9 with SMTP id bd9so67039381lab.2 for ; Tue, 26 May 2015 05:57:15 -0700 (PDT) X-Received: by 10.152.29.34 with SMTP id g2mr15652580lah.73.1432645035544; Tue, 26 May 2015 05:57:15 -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.108.230 with SMTP id hn6csp2528937lbb; Tue, 26 May 2015 05:57:14 -0700 (PDT) X-Received: by 10.66.102.37 with SMTP id fl5mr49410590pab.88.1432645032452; Tue, 26 May 2015 05:57:12 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id mb4si20834218pdb.224.2015.05.26.05.57.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 May 2015 05:57:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; 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 1YxENf-000734-Kx; Tue, 26 May 2015 12:54:51 +0000 Received: from mail-pa0-f44.google.com ([209.85.220.44]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YxEKA-0004T2-V8 for linux-arm-kernel@lists.infradead.org; Tue, 26 May 2015 12:51:16 +0000 Received: by pacwv17 with SMTP id wv17so92169065pac.2 for ; Tue, 26 May 2015 05:50:53 -0700 (PDT) X-Received: by 10.68.94.193 with SMTP id de1mr48191050pbb.153.1432644653260; Tue, 26 May 2015 05:50:53 -0700 (PDT) Received: from localhost ([180.150.153.56]) by mx.google.com with ESMTPSA id fs16sm13066192pdb.12.2015.05.26.05.50.51 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 26 May 2015 05:50:52 -0700 (PDT) From: Hanjun Guo To: Bjorn Helgaas , Arnd Bergmann , Catalin Marinas , Will Deacon , "Rafael J. Wysocki" Subject: [PATCH 10/11] XEN / PCI: Remove the dependence on arch x86 when PCI_MMCONFIG=y Date: Tue, 26 May 2015 20:49:23 +0800 Message-Id: <1432644564-24746-11-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1432644564-24746-1-git-send-email-hanjun.guo@linaro.org> References: <1432644564-24746-1-git-send-email-hanjun.guo@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150526_055115_087335_36A64F54 X-CRM114-Status: GOOD ( 13.23 ) X-Spam-Score: -1.8 (-) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-1.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.220.44 listed in list.dnswl.org] -1.1 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.220.44 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record Cc: Lorenzo Pieralisi , linaro-acpi@lists.linaro.org, Boris Ostrovsky , linux-pci@vger.kernel.org, Konrad Rzeszutek Wilk , Liviu Dudau , linux-kernel@vger.kernel.org, Tomasz Nowicki , linux-acpi@vger.kernel.org, Hanjun Guo , Suravee Suthikulpanit , Mark Salter , Yijing Wang , Thomas Gleixner , Jiang Liu , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: hanjun.guo@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.215.53 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 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 --- 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;