From patchwork Sat Jun 24 01:50:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 780320 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wvdqh4dKvz9s8H for ; Sat, 24 Jun 2017 12:02:22 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="tM8mDcUD"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=dabbelt-com.20150623.gappssmtp.com header.i=@dabbelt-com.20150623.gappssmtp.com header.b="B/PtFAOv"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=fYfKpxypDgIy2sL/r2Up/jxOuyjdMU5C79n3AReiXjQ=; b=tM8mDcUDU5Tskh2hDoPqSvcmKg m5lSs1khFl1+QLK2ocR2isqwH6rLqVYrlT1KYxvMDNMLvOSVmL425k2oxKsZabf3TqM1DRd9Dvx91 2ItaYS3+JABZwXCvfLwaBWCm7fc2hDXJhpEmhKE7nZjeb9Ts9cFKV8jqEPW8YCsJSIIAJWtP/b9+n oNEdBqWlQz9RD9yRvMoCbvpctVy+kk4H0m4NhztUZY1wVd1nh85tzf1Bcjk+oAjmjXPq1+fH/IXWE YW5lf/eNccOG8rE3Sfw/owcdWiSN9vH5Q1lPM13/+eRmNpFGB5hE4RovWYhJQaffZMPmy0228SwbW PzLx3jjw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dOaOz-0001UE-DL; Sat, 24 Jun 2017 02:02:21 +0000 Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dOaOv-0001Pb-2C for linux-snps-arc@lists.infradead.org; Sat, 24 Jun 2017 02:02:19 +0000 Received: by mail-pg0-x241.google.com with SMTP id j186so8088793pge.1 for ; Fri, 23 Jun 2017 19:01:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20150623.gappssmtp.com; s=20150623; h=from:to:to:to:to:to:cc:cc:cc:cc:cc:cc:cc:subject:date:message-id :in-reply-to:references; bh=2JYXKY2J7ArobP2AYP+Udjxk681TPcTDEJY2aPcGkBY=; b=B/PtFAOvcTih27+6YXbbV45uzANeq8wNiH2qxJ6jgm8m/9JMGhYdD5d2Z6KDygVQDj sTFwkJD4J9Ows+d1eoM2xW+cH4dy5ZJzi7Qs8T+TIiXcdzrtOrKGUcWfrQChwhOqhh2z j8JEAAU32L9Dp4oHie1AR394qCgMU3B1zTnMWtbVB7Gci1EW62ubjIB2Wj5YwyG5ZHkp NNiLfTwN067qFOVCkhqGGs2jb2u97H/B6YBNM31UO1JOrPEbBsjnaWsNJueRX5A1uC75 g6E8FcTe7iNttvPuV8ffYPsVzgn/bHf6DR5I6hAYtcZUaYkAT7tSCSFaT4F5SAPOB7eG OhEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:to:to:to:to:cc:cc:cc:cc:cc:cc:cc:subject :date:message-id:in-reply-to:references; bh=2JYXKY2J7ArobP2AYP+Udjxk681TPcTDEJY2aPcGkBY=; b=LFd67jmxs+BlHH68xtFL3GvnueEjhCwsKxF4V9yhqN4uu49YNapFFb6eBEVjXJqqNY GVNw0rgu6GkFC7GEeSvDj/qL+CfKmLrVYLtyl2oyP2GwPwSW2uI1AY7Wvhe3ghliStV9 foEFv+awZYqjdgu3f74SBOsCiNFnczTXXps907ZWi7PASRvu0ceOPcCruvG0Mocs4biX RjH2TghgvYBZMsW2kCfvEGfiVjqkk13lc9KJ4cQPi1auukGhq5diJLLhyM2Pul9080U1 0KrCfFBzKDqUJAi0lGrd95A7Wl9JIjHM+0RWwYVEsNzFSwlqCKumjt2Yf3B2Zu8I1jR9 pvzA== X-Gm-Message-State: AKS2vOx7vNw8zyRcGV+RtiPi+pM/rFOW5u+tTQCTSJoVbR4zW8v8ApIx FWKCsSGhOaJokF+a X-Received: by 10.99.64.197 with SMTP id n188mr3714458pga.281.1498269715447; Fri, 23 Jun 2017 19:01:55 -0700 (PDT) Received: from localhost ([216.38.154.21]) by smtp.gmail.com with ESMTPSA id a29sm5990331pfg.30.2017.06.23.19.01.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Jun 2017 19:01:54 -0700 (PDT) From: Palmer Dabbelt To: linux-pci@vger.kernel.org To: linux-kernel@vger.kernel.org To: bhelgaas@google.com To: hch@infradead.org To: Arnd Bergmann Subject: [PATCH 1/3] pci: Add a generic, weakly-linked pcibios_fixup_bus Date: Fri, 23 Jun 2017 18:50:42 -0700 Message-Id: <20170624015044.16746-2-palmer@dabbelt.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170624015044.16746-1-palmer@dabbelt.com> References: <20170624015044.16746-1-palmer@dabbelt.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170623_190217_144020_08765601 X-CRM114-Status: GOOD ( 12.84 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:400e:c05:0:0:0:241 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-s390@vger.kernel.org, linux-ia64@vger.kernel.org, linux-cris-kernel@axis.com, linux-sh@vger.kernel.org, Palmer Dabbelt , sparclinux@vger.kernel.org, linux-snps-arc@lists.infradead.org MIME-Version: 1.0 Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Multiple architectures define this as an empty function, and I'm adding another one as part of the RISC-V port. This adds a __weak version of pci_fixup_bios and deletes the now obselete ones in a handful of ports. The only functional change should be that microblaze used to export pcibios_fixup_bus. None of the other architectures export this, so I just dropped it. Signed-off-by: Palmer Dabbelt --- arch/arc/kernel/pcibios.c | 4 ---- arch/arm64/kernel/pci.c | 8 -------- arch/cris/arch-v32/drivers/pci/bios.c | 4 ---- arch/microblaze/pci/pci-common.c | 6 ------ arch/s390/pci/pci.c | 4 ---- arch/sh/drivers/pci/pci.c | 8 -------- arch/sparc/kernel/pci.c | 4 ---- arch/tile/kernel/pci.c | 8 -------- arch/tile/kernel/pci_gx.c | 5 ----- drivers/pci/probe.c | 10 ++++++++++ 10 files changed, 10 insertions(+), 51 deletions(-) diff --git a/arch/arc/kernel/pcibios.c b/arch/arc/kernel/pcibios.c index 72e1d73d0bd6..1c8df8fd5fed 100644 --- a/arch/arc/kernel/pcibios.c +++ b/arch/arc/kernel/pcibios.c @@ -16,7 +16,3 @@ resource_size_t pcibios_align_resource(void *data, const struct resource *res, { return res->start; } - -void pcibios_fixup_bus(struct pci_bus *bus) -{ -} diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c index c7e3e6387a49..4c7f451aca05 100644 --- a/arch/arm64/kernel/pci.c +++ b/arch/arm64/kernel/pci.c @@ -23,14 +23,6 @@ #include /* - * Called after each bus is probed, but before its children are examined - */ -void pcibios_fixup_bus(struct pci_bus *bus) -{ - /* nothing to do, expected to be removed in the future */ -} - -/* * We don't have to worry about legacy ISA devices, so nothing to do here */ resource_size_t pcibios_align_resource(void *data, const struct resource *res, diff --git a/arch/cris/arch-v32/drivers/pci/bios.c b/arch/cris/arch-v32/drivers/pci/bios.c index 394c2a73d5e2..5cc622c0225e 100644 --- a/arch/cris/arch-v32/drivers/pci/bios.c +++ b/arch/cris/arch-v32/drivers/pci/bios.c @@ -2,10 +2,6 @@ #include #include -void pcibios_fixup_bus(struct pci_bus *b) -{ -} - void pcibios_set_master(struct pci_dev *dev) { u8 lat; diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c index 404fb38d06b7..940f266e5d5c 100644 --- a/arch/microblaze/pci/pci-common.c +++ b/arch/microblaze/pci/pci-common.c @@ -810,12 +810,6 @@ void pcibios_setup_bus_devices(struct pci_bus *bus) } } -void pcibios_fixup_bus(struct pci_bus *bus) -{ - /* nothing to do */ -} -EXPORT_SYMBOL(pcibios_fixup_bus); - /* * We need to avoid collisions with `mirrored' VGA ports * and other strange ISA hardware, so we always want the diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c index 8051df109db3..98a54dd63483 100644 --- a/arch/s390/pci/pci.c +++ b/arch/s390/pci/pci.c @@ -234,10 +234,6 @@ static int zpci_cfg_store(struct zpci_dev *zdev, int offset, u32 val, u8 len) return rc; } -void pcibios_fixup_bus(struct pci_bus *bus) -{ -} - resource_size_t pcibios_align_resource(void *data, const struct resource *res, resource_size_t size, resource_size_t align) diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c index c99ee286b69f..749642e1272e 100644 --- a/arch/sh/drivers/pci/pci.c +++ b/arch/sh/drivers/pci/pci.c @@ -155,14 +155,6 @@ static int __init pcibios_init(void) subsys_initcall(pcibios_init); /* - * Called after each bus is probed, but before its children - * are examined. - */ -void pcibios_fixup_bus(struct pci_bus *bus) -{ -} - -/* * We need to avoid collisions with `mirrored' VGA ports * and other strange ISA hardware, so we always want the * addresses to be allocated in the 0x000-0x0ff region diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c index 7eceaa10836f..78d3dc25e126 100644 --- a/arch/sparc/kernel/pci.c +++ b/arch/sparc/kernel/pci.c @@ -690,10 +690,6 @@ struct pci_bus *pci_scan_one_pbm(struct pci_pbm_info *pbm, return bus; } -void pcibios_fixup_bus(struct pci_bus *pbus) -{ -} - resource_size_t pcibios_align_resource(void *data, const struct resource *res, resource_size_t size, resource_size_t align) { diff --git a/arch/tile/kernel/pci.c b/arch/tile/kernel/pci.c index bc6656b5708b..3113d4d5c329 100644 --- a/arch/tile/kernel/pci.c +++ b/arch/tile/kernel/pci.c @@ -369,14 +369,6 @@ int __init pcibios_init(void) } subsys_initcall(pcibios_init); -/* - * No bus fixups needed. - */ -void pcibios_fixup_bus(struct pci_bus *bus) -{ - /* Nothing needs to be done. */ -} - void pcibios_set_master(struct pci_dev *dev) { /* No special bus mastering setup handling. */ diff --git a/arch/tile/kernel/pci_gx.c b/arch/tile/kernel/pci_gx.c index b554a68eea1b..b89172b592cc 100644 --- a/arch/tile/kernel/pci_gx.c +++ b/arch/tile/kernel/pci_gx.c @@ -1038,11 +1038,6 @@ int __init pcibios_init(void) } subsys_initcall(pcibios_init); -/* No bus fixups needed. */ -void pcibios_fixup_bus(struct pci_bus *bus) -{ -} - /* Process any "pci=" kernel boot arguments. */ char *__init pcibios_setup(char *str) { diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 19c8950c6c38..1ff44dde7164 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -2227,6 +2227,16 @@ void pcie_bus_configure_settings(struct pci_bus *bus) } EXPORT_SYMBOL_GPL(pcie_bus_configure_settings); +/* + * Called after each bus is probed, but before its children are examined. This + * is marked as __weak because multiple architectures define it + */ +__attribute__ ((weak)) +void pcibios_fixup_bus(struct pci_bus *bus) +{ + /* nothing to do, expected to be removed in the future */ +} + unsigned int pci_scan_child_bus(struct pci_bus *bus) { unsigned int devfn, pass, max = bus->busn_res.start;