linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Xuetao Guan <gxt@mprc.pku.edu.cn>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Russell King <linux@arm.linux.org.uk>,
	Arnd Bergmann <arnd@arndb.de>,
	David Daney <david.daney@cavium.com>,
	linux-pci@vger.kernel.org, Will Deacon <will.deacon@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Yinghai Lu <yinghai@kernel.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 4/4] ARM/PCI: remove arch specific pcibios_enable_device()
Date: Thu, 23 Jun 2016 11:41:33 -0500	[thread overview]
Message-ID: <20160623164133.GC17987@localhost> (raw)
In-Reply-To: <62140.117.114.135.40.1466678343.squirrel@mprc.pku.edu.cn>

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 <bhelgaas@google.com>
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 <bhelgaas@google.com>

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;
 }

  reply	other threads:[~2016-06-23 16:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-08 11:04 [PATCH v3 0/4] ARM/ARM64: PCI: PCI_PROBE_ONLY clean-up Lorenzo Pieralisi
2016-06-08 11:04 ` [PATCH v3 1/4] PCI: add generic code to claim bus resources Lorenzo Pieralisi
2016-06-08 11:04 ` [PATCH v3 2/4] PCI: host-generic: claim bus resources on PCI_PROBE_ONLY set-ups Lorenzo Pieralisi
2016-06-08 11:04 ` [PATCH v3 3/4] ARM64/PCI: remove arch specific pcibios_enable_device() Lorenzo Pieralisi
2016-06-08 11:04 ` [PATCH v3 4/4] ARM/PCI: " Lorenzo Pieralisi
2016-06-22 22:43   ` Bjorn Helgaas
2016-06-23 10:55     ` Lorenzo Pieralisi
2016-06-22 23:07   ` Bjorn Helgaas
2016-06-23 10:39     ` Xuetao Guan
2016-06-23 16:41       ` Bjorn Helgaas [this message]
2016-06-30 14:01         ` Xuetao Guan
2016-06-22 23:01 ` [PATCH v3 0/4] ARM/ARM64: PCI: PCI_PROBE_ONLY clean-up Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160623164133.GC17987@localhost \
    --to=helgaas@kernel.org \
    --cc=arnd@arndb.de \
    --cc=bhelgaas@google.com \
    --cc=catalin.marinas@arm.com \
    --cc=david.daney@cavium.com \
    --cc=gxt@mprc.pku.edu.cn \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=will.deacon@arm.com \
    --cc=yinghai@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).