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: 9195587 X-Patchwork-Delegate: bhelgaas@google.com 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 0B68B6077D for ; Thu, 23 Jun 2016 16:41:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F15382843C for ; Thu, 23 Jun 2016 16:41:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E5ABB2845C; Thu, 23 Jun 2016 16:41:51 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8B0C82843C for ; Thu, 23 Jun 2016 16:41:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751821AbcFWQll (ORCPT ); Thu, 23 Jun 2016 12:41:41 -0400 Received: from mail.kernel.org ([198.145.29.136]:46062 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751760AbcFWQlk (ORCPT ); Thu, 23 Jun 2016 12:41:40 -0400 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 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 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 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.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 --- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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; }