From patchwork Tue Nov 17 17:03:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Pieralisi X-Patchwork-Id: 7639951 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 4247F9F1D3 for ; Tue, 17 Nov 2015 17:06:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6A115204D6 for ; Tue, 17 Nov 2015 17:06:32 +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 89F3F204D3 for ; Tue, 17 Nov 2015 17:06:31 +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 1Zyjfg-0004s5-Os; Tue, 17 Nov 2015 17:03:56 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zyjf8-0004P0-DF for linux-arm-kernel@lists.infradead.org; Tue, 17 Nov 2015 17:03:25 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 13ED43F8; Tue, 17 Nov 2015 09:02:50 -0800 (PST) Received: from red-moon.cambridge.arm.com (red-moon.cambridge.arm.com [10.1.203.137]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 414E63F213; Tue, 17 Nov 2015 09:03:02 -0800 (PST) From: Lorenzo Pieralisi To: linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org Subject: [PATCH 3/3] arm/arm64: pci: remove arch specific pcibios_enable_device() Date: Tue, 17 Nov 2015 17:03:58 +0000 Message-Id: <1447779838-15585-3-git-send-email-lorenzo.pieralisi@arm.com> X-Mailer: git-send-email 2.5.1 In-Reply-To: <1447779838-15585-1-git-send-email-lorenzo.pieralisi@arm.com> References: <1447779838-15585-1-git-send-email-lorenzo.pieralisi@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151117_090322_598182_B1056608 X-CRM114-Status: GOOD ( 11.47 ) X-Spam-Score: -7.5 (-------) 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: Lorenzo Pieralisi , Russell King , Arnd Bergmann , Catalin Marinas , Will Deacon , Bjorn Helgaas 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.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, 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 The arm/arm64 pcibios_enable_device() implementations exist solely to prevent enabling PCI resources on PROBE_ONLY systems, since on those systems the PCI resources are currently not claimed (ie validated and inserted in the PCI resource tree) therefore they can not be enabled since this would trigger PCI set-ups failures. By introducing resources claiming in the PCI host controllers set-ups that have PROBE_ONLY as a probe option, there is no need for arch specific pcibios_enable_device() implementations anymore in that the kernel can rely on the generic pcibios_enable_device() implementation without resorting to arch specific code to work around the missing resources claiming enumeration step. This patch removes the pcibios_enable_device() implementations from the arm/arm64 arch back-ends. Signed-off-by: Lorenzo Pieralisi Cc: Arnd Bergmann Cc: Will Deacon Cc: Bjorn Helgaas Cc: Russell King Cc: Catalin Marinas Acked-by: Will Deacon --- arch/arm/kernel/bios32.c | 12 ------------ arch/arm64/kernel/pci.c | 13 ------------- 2 files changed, 25 deletions(-) diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c index 6551d28..9c998d5 100644 --- a/arch/arm/kernel/bios32.c +++ b/arch/arm/kernel/bios32.c @@ -590,18 +590,6 @@ resource_size_t pcibios_align_resource(void *data, const struct resource *res, return start; } -/** - * pcibios_enable_device - Enable I/O and memory. - * @dev: PCI device to be enabled - */ -int pcibios_enable_device(struct pci_dev *dev, int mask) -{ - if (pci_has_flag(PCI_PROBE_ONLY)) - return 0; - - return pci_enable_resources(dev, mask); -} - int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, enum pci_mmap_state mmap_state, int write_combine) { diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c index b3d098b..4095379 100644 --- a/arch/arm64/kernel/pci.c +++ b/arch/arm64/kernel/pci.c @@ -38,19 +38,6 @@ resource_size_t pcibios_align_resource(void *data, const struct resource *res, return res->start; } -/** - * pcibios_enable_device - Enable I/O and memory. - * @dev: PCI device to be enabled - * @mask: bitmask of BARs to enable - */ -int pcibios_enable_device(struct pci_dev *dev, int mask) -{ - if (pci_has_flag(PCI_PROBE_ONLY)) - return 0; - - return pci_enable_resources(dev, mask); -} - /* * Try to assign the IRQ number from DT when adding a new device */