From patchwork Thu Jun 23 16:41:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 9195595 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1C1DE6077D for ; Thu, 23 Jun 2016 16:43:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C9702843C for ; Thu, 23 Jun 2016 16:43:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 009E22845F; Thu, 23 Jun 2016 16:43:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id 80BA02843C for ; Thu, 23 Jun 2016 16:43:35 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bG7hb-0007Dr-6y; Thu, 23 Jun 2016 16:42:03 +0000 Received: from mail.kernel.org ([198.145.29.136]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bG7hY-00079f-57 for linux-arm-kernel@lists.infradead.org; Thu, 23 Jun 2016 16:42:00 +0000 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 97F79201C7; Thu, 23 Jun 2016 16:41:38 +0000 (UTC) Received: from localhost (173-27-161-33.client.mchsi.com [173.27.161.33]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1D7F6201BB; Thu, 23 Jun 2016 16:41:37 +0000 (UTC) Date: Thu, 23 Jun 2016 11:41:33 -0500 From: Bjorn Helgaas To: Xuetao Guan Subject: Re: [PATCH v3 4/4] ARM/PCI: remove arch specific pcibios_enable_device() Message-ID: <20160623164133.GC17987@localhost> References: <1465383890-13538-1-git-send-email-lorenzo.pieralisi@arm.com> <1465383890-13538-5-git-send-email-lorenzo.pieralisi@arm.com> <20160622230746.GI25485@localhost> <62140.117.114.135.40.1466678343.squirrel@mprc.pku.edu.cn> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <62140.117.114.135.40.1466678343.squirrel@mprc.pku.edu.cn> User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160623_094200_308458_57D592F6 X-CRM114-Status: GOOD ( 26.77 ) 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 , David Daney , linux-pci@vger.kernel.org, Will Deacon , Catalin Marinas , Bjorn Helgaas , Yinghai Lu , 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 X-Virus-Scanned: ClamAV using ClamSMTP On Thu, Jun 23, 2016 at 06:39:03PM +0800, Xuetao Guan wrote: > > [+cc Guan] > > > > On Wed, Jun 08, 2016 at 12:04:50PM +0100, Lorenzo Pieralisi wrote: > >> The arm pcibios_enable_device() implementation exists solely > >> to prevent enabling PCI resources on PCI_PROBE_ONLY systems, since > >> on those systems the PCI resources are currently not claimed (ie > >> inserted in the PCI resource tree - which means their parent > >> pointer is not correctly set-up) therefore they can not be enabled > >> since this would trigger PCI set-ups failures. > >> > >> After removing the pci=firmware command line option in: > >> > >> commit 903589ca7165 ("ARM: 8554/1: kernel: pci: remove pci=firmware > >> command line parameter handling") > > > > 903589ca7165 removed "pci=firmware" from ARM and from > > Documentation/kernel-parameters.txt (where it was documented as > > ARM-specific). > > > > I think unicore32 copied that code from arm, so unicore32 is one of > > the few remaining arches that can set PCI_PROBE_ONLY. I suspect this > > was just copied from arm and may not be necessary on unicore32. > > > > Guan, can you confirm that PCI_PROBE_ONLY is necessary on unicore32, > > or that it can be removed? > > > > Yes, this code was copied from arm, and it's not necessary. > It can be removed safely. Great, thank you! I'll add the patch below to my pci/resource branch for v4.8. Let me know if you see any issues with it. commit b9b8a53e24649e48c0a8bceb8d9d8fe1cfee018c Author: Bjorn Helgaas Date: Thu Jun 23 11:33:24 2016 -0500 unicore32/PCI: Remove pci=firmware command line parameter handling Remove support for the "pci=firmware" command line parameter, which was way to keep the kernel from changing any PCI BAR assignments. This was copied from ARM, but is not actually needed on unicore32. The corresponding ARM support was removed by 903589ca7165 ("ARM: 8554/1: kernel: pci: remove pci=firmware command line parameter handling"). Signed-off-by: Bjorn Helgaas Acked-by: GUAN Xuetao diff --git a/arch/unicore32/kernel/pci.c b/arch/unicore32/kernel/pci.c index d45fa5f..62137d1 100644 --- a/arch/unicore32/kernel/pci.c +++ b/arch/unicore32/kernel/pci.c @@ -265,10 +265,8 @@ static int __init pci_common_init(void) pci_fixup_irqs(pci_common_swizzle, pci_puv3_map_irq); - if (!pci_has_flag(PCI_PROBE_ONLY)) { - pci_bus_size_bridges(puv3_bus); - pci_bus_assign_resources(puv3_bus); - } + pci_bus_size_bridges(puv3_bus); + pci_bus_assign_resources(puv3_bus); pci_bus_add_devices(puv3_bus); return 0; } @@ -279,9 +277,6 @@ char * __init pcibios_setup(char *str) if (!strcmp(str, "debug")) { debug_pci = 1; return NULL; - } else if (!strcmp(str, "firmware")) { - pci_add_flags(PCI_PROBE_ONLY); - return NULL; } return str; }