From patchwork Wed Sep 16 10:30:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Pieralisi X-Patchwork-Id: 11779533 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5E8496CA for ; Wed, 16 Sep 2020 10:32:41 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1A48920738 for ; Wed, 16 Sep 2020 10:32:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gVtLifmE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1A48920738 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=2RWmPbyBFcx7smcbvcypor5QxPPw0LYs55Gpy6P4Xus=; b=gVtLifmEl6bI+uo/9ogpMNEIw kP7KfS4TCPsivdGNCPgQEW5uVwQLjqpPI8dIMSlpUnRj2ZGgSKW2ZJk6xqhlprj3jL4dPWBo5MSel chZKq83F6t/Q/eIX5HsK3hrs1XTAw4gnRGtaunSq8/mCOoDW5xms/XijDAWj1LfQ1ao1/bwXVlek1 xc6zeph7iI24NBmA7wOKgk8Ttkl36KBV6dEW396rEj7ndvsd4L89XzEI7P8MDwy0GCoJZYq4mhAq9 62MLZwLdGAA25Ok91jG5MKXKvhf8vo5XpHY3TJawDnTkP0O928WNjzAQu6xY8XcqWbq4mAy4uh2+L z2Lwd933w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIUiM-00072a-Fd; Wed, 16 Sep 2020 10:31:02 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIUiH-00072G-7z for linux-arm-kernel@lists.infradead.org; Wed, 16 Sep 2020 10:30:58 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7C6281FB; Wed, 16 Sep 2020 03:30:52 -0700 (PDT) Received: from red-moon.arm.com (unknown [10.57.6.237]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9EE3B3F718; Wed, 16 Sep 2020 03:30:51 -0700 (PDT) From: Lorenzo Pieralisi To: linux-pci@vger.kernel.org Subject: [PATCH v2] ARM/PCI: Remove unused fields from struct hw_pci Date: Wed, 16 Sep 2020 11:30:45 +0100 Message-Id: <20200916103045.28651-1-lorenzo.pieralisi@arm.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200904141607.4066-1-lorenzo.pieralisi@arm.com> References: <20200904141607.4066-1-lorenzo.pieralisi@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200916_063057_397608_58DF9726 X-CRM114-Status: GOOD ( 15.83 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [217.140.110.172 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , Lorenzo Pieralisi , Russell King , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The msi_ctrl, io_optional and align_resource fields in struct hw_pci are currently unused by arm/mach PCI host controller drivers and we won't be adding any new users. Remove them and related code. Link: https://lore.kernel.org/r/20200904141607.4066-1-lorenzo.pieralisi@arm.com Signed-off-by: Lorenzo Pieralisi Cc: Rob Herring Cc: Russell King Reviewed-by: Rob Herring --- v1->v2 - Removed io_optional and align_resource fields as well [v1] https://lore.kernel.org/linux-pci/20200904141607.4066-1-lorenzo.pieralisi@arm.com arch/arm/include/asm/mach/pci.h | 7 ------- arch/arm/kernel/bios32.c | 16 ++-------------- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/arch/arm/include/asm/mach/pci.h b/arch/arm/include/asm/mach/pci.h index 83d340702680..ea9bd08895b7 100644 --- a/arch/arm/include/asm/mach/pci.h +++ b/arch/arm/include/asm/mach/pci.h @@ -17,10 +17,8 @@ struct pci_host_bridge; struct device; struct hw_pci { - struct msi_controller *msi_ctrl; struct pci_ops *ops; int nr_controllers; - unsigned int io_optional:1; void **private_data; int (*setup)(int nr, struct pci_sys_data *); int (*scan)(int nr, struct pci_host_bridge *); @@ -28,11 +26,6 @@ struct hw_pci { void (*postinit)(void); u8 (*swizzle)(struct pci_dev *dev, u8 *pin); int (*map_irq)(const struct pci_dev *dev, u8 slot, u8 pin); - resource_size_t (*align_resource)(struct pci_dev *dev, - const struct resource *res, - resource_size_t start, - resource_size_t size, - resource_size_t align); }; /* diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c index eecec16aa708..e7ef2b5bea9c 100644 --- a/arch/arm/kernel/bios32.c +++ b/arch/arm/kernel/bios32.c @@ -394,8 +394,7 @@ static int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) return irq; } -static int pcibios_init_resource(int busnr, struct pci_sys_data *sys, - int io_optional) +static int pcibios_init_resource(int busnr, struct pci_sys_data *sys) { int ret; struct resource_entry *window; @@ -405,14 +404,6 @@ static int pcibios_init_resource(int busnr, struct pci_sys_data *sys, &iomem_resource, sys->mem_offset); } - /* - * If a platform says I/O port support is optional, we don't add - * the default I/O space. The platform is responsible for adding - * any I/O space it needs. - */ - if (io_optional) - return 0; - resource_list_for_each_entry(window, &sys->resources) if (resource_type(window->res) == IORESOURCE_IO) return 0; @@ -462,7 +453,7 @@ static void pcibios_init_hw(struct device *parent, struct hw_pci *hw, if (ret > 0) { - ret = pcibios_init_resource(nr, sys, hw->io_optional); + ret = pcibios_init_resource(nr, sys); if (ret) { pci_free_host_bridge(bridge); break; @@ -480,9 +471,6 @@ static void pcibios_init_hw(struct device *parent, struct hw_pci *hw, bridge->sysdata = sys; bridge->busnr = sys->busnr; bridge->ops = hw->ops; - bridge->msi = hw->msi_ctrl; - bridge->align_resource = - hw->align_resource; ret = pci_scan_root_bus_bridge(bridge); }