All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Will Deacon <will.deacon@arm.com>,
	linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org,
	Arnd Bergmann <arnd@arndb.de>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Russell King <linux@arm.linux.org.uk>,
	Catalin Marinas <catalin.marinas@arm.com>
Subject: Re: [PATCH 3/3] arm/arm64: pci: remove arch specific pcibios_enable_device()
Date: Thu, 25 Feb 2016 16:05:33 +0000	[thread overview]
Message-ID: <20160225160533.GA3596@red-moon> (raw)
In-Reply-To: <20160225152417.GB8120@localhost>

Hi Bjorn,

On Thu, Feb 25, 2016 at 09:24:17AM -0600, Bjorn Helgaas wrote:
> Hi Lorenzo,
> 
> On Wed, Jan 20, 2016 at 04:22:15PM +0000, Lorenzo Pieralisi wrote:
> > On Mon, Nov 23, 2015 at 01:49:21PM +0000, Will Deacon wrote:
> > > On Tue, Nov 17, 2015 at 05:03:58PM +0000, Lorenzo Pieralisi wrote:
> > > > The arm/arm64 pcibios_enable_device() implementations exist solely
> > > > to prevent enabling PCI resources on PROBE_ONLY systems, since
> > > > on those systems the PCI resources are currently not claimed (ie
> > > > validated and inserted in the PCI resource tree) therefore they can
> > > > not be enabled since this would trigger PCI set-ups failures.
> > > > 
> > > > By introducing resources claiming in the PCI host controllers set-ups
> > > > that have PROBE_ONLY as a probe option, there is no need for arch specific
> > > > pcibios_enable_device() implementations anymore in that the kernel can
> > > > rely on the generic pcibios_enable_device() implementation without
> > > > resorting to arch specific code to work around the missing resources
> > > > claiming enumeration step.
> > > > 
> > > > This patch removes the pcibios_enable_device() implementations from
> > > > the arm/arm64 arch back-ends.
> > > > 
> > > > Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> > > > Cc: Arnd Bergmann <arnd@arndb.de>
> > > > Cc: Will Deacon <will.deacon@arm.com>
> > > > Cc: Bjorn Helgaas <bhelgaas@google.com>
> > > > Cc: Russell King <linux@arm.linux.org.uk>
> > > > Cc: Catalin Marinas <catalin.marinas@arm.com>
> > > > ---
> > > >  arch/arm/kernel/bios32.c | 12 ------------
> > > >  arch/arm64/kernel/pci.c  | 13 -------------
> > > >  2 files changed, 25 deletions(-)
> > > 
> > > Acked-by: Will Deacon <will.deacon@arm.com>
> > 
> > Thanks, unfortunately I spotted that ARM platforms can set
> > PCI_PROBE_ONLY also via command line (pcibios_setup()), which means
> > that I have to add resource claiming to all ARM PCI controllers that
> > check PCI_PROBE_ONLY (inclusive of ARM bios32) to really make sure we
> > can apply this patch or alternatevely we add the resource claiming
> > to the pcibios_fixup_bus() callback (but we can claim resources only if
> > PCI_PROBE_ONLY is set lest we trigger regressions) which would be the
> > simpler solution.
> 
> So where are we?  The above response sounds like this series still
> needs a little tweaking?

Yes, I rewrote the generic PCI layer for claiming resources (Tomasz's
posted it in its ACPI PCI ARM64 series):

https://lkml.org/lkml/2016/2/16/412

My only concern is removing PCI_PROBE_ONLY handling from arm 32 bit code,
since I noticed it can be set on the command line there, claiming
resources in pcibios arm 32 should do the trick, I will move the ARM
32-bit handling in a separate patch (hopefully someone can help me test
it on affected platforms (?), I will ask Russell the best way to do it).

Thanks,
Lorenzo

WARNING: multiple messages have this Message-ID (diff)
From: lorenzo.pieralisi@arm.com (Lorenzo Pieralisi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] arm/arm64: pci: remove arch specific pcibios_enable_device()
Date: Thu, 25 Feb 2016 16:05:33 +0000	[thread overview]
Message-ID: <20160225160533.GA3596@red-moon> (raw)
In-Reply-To: <20160225152417.GB8120@localhost>

Hi Bjorn,

On Thu, Feb 25, 2016 at 09:24:17AM -0600, Bjorn Helgaas wrote:
> Hi Lorenzo,
> 
> On Wed, Jan 20, 2016 at 04:22:15PM +0000, Lorenzo Pieralisi wrote:
> > On Mon, Nov 23, 2015 at 01:49:21PM +0000, Will Deacon wrote:
> > > On Tue, Nov 17, 2015 at 05:03:58PM +0000, Lorenzo Pieralisi wrote:
> > > > The arm/arm64 pcibios_enable_device() implementations exist solely
> > > > to prevent enabling PCI resources on PROBE_ONLY systems, since
> > > > on those systems the PCI resources are currently not claimed (ie
> > > > validated and inserted in the PCI resource tree) therefore they can
> > > > not be enabled since this would trigger PCI set-ups failures.
> > > > 
> > > > By introducing resources claiming in the PCI host controllers set-ups
> > > > that have PROBE_ONLY as a probe option, there is no need for arch specific
> > > > pcibios_enable_device() implementations anymore in that the kernel can
> > > > rely on the generic pcibios_enable_device() implementation without
> > > > resorting to arch specific code to work around the missing resources
> > > > claiming enumeration step.
> > > > 
> > > > This patch removes the pcibios_enable_device() implementations from
> > > > the arm/arm64 arch back-ends.
> > > > 
> > > > Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> > > > Cc: Arnd Bergmann <arnd@arndb.de>
> > > > Cc: Will Deacon <will.deacon@arm.com>
> > > > Cc: Bjorn Helgaas <bhelgaas@google.com>
> > > > Cc: Russell King <linux@arm.linux.org.uk>
> > > > Cc: Catalin Marinas <catalin.marinas@arm.com>
> > > > ---
> > > >  arch/arm/kernel/bios32.c | 12 ------------
> > > >  arch/arm64/kernel/pci.c  | 13 -------------
> > > >  2 files changed, 25 deletions(-)
> > > 
> > > Acked-by: Will Deacon <will.deacon@arm.com>
> > 
> > Thanks, unfortunately I spotted that ARM platforms can set
> > PCI_PROBE_ONLY also via command line (pcibios_setup()), which means
> > that I have to add resource claiming to all ARM PCI controllers that
> > check PCI_PROBE_ONLY (inclusive of ARM bios32) to really make sure we
> > can apply this patch or alternatevely we add the resource claiming
> > to the pcibios_fixup_bus() callback (but we can claim resources only if
> > PCI_PROBE_ONLY is set lest we trigger regressions) which would be the
> > simpler solution.
> 
> So where are we?  The above response sounds like this series still
> needs a little tweaking?

Yes, I rewrote the generic PCI layer for claiming resources (Tomasz's
posted it in its ACPI PCI ARM64 series):

https://lkml.org/lkml/2016/2/16/412

My only concern is removing PCI_PROBE_ONLY handling from arm 32 bit code,
since I noticed it can be set on the command line there, claiming
resources in pcibios arm 32 should do the trick, I will move the ARM
32-bit handling in a separate patch (hopefully someone can help me test
it on affected platforms (?), I will ask Russell the best way to do it).

Thanks,
Lorenzo

  reply	other threads:[~2016-02-25 16:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-17 17:03 [PATCH 1/3] drivers: pci: add generic code to claim bus resources Lorenzo Pieralisi
2015-11-17 17:03 ` Lorenzo Pieralisi
2015-11-17 17:03 ` [PATCH 2/3] drivers: pci: host-generic: claim bus resources on PROBE_ONLY set-ups Lorenzo Pieralisi
2015-11-17 17:03   ` Lorenzo Pieralisi
2015-11-23 13:47   ` Will Deacon
2015-11-23 13:47     ` Will Deacon
2015-11-17 17:03 ` [PATCH 3/3] arm/arm64: pci: remove arch specific pcibios_enable_device() Lorenzo Pieralisi
2015-11-17 17:03   ` Lorenzo Pieralisi
2015-11-23 13:49   ` Will Deacon
2015-11-23 13:49     ` Will Deacon
2016-01-20 16:22     ` Lorenzo Pieralisi
2016-01-20 16:22       ` Lorenzo Pieralisi
2016-02-25 15:24       ` Bjorn Helgaas
2016-02-25 15:24         ` Bjorn Helgaas
2016-02-25 16:05         ` Lorenzo Pieralisi [this message]
2016-02-25 16:05           ` Lorenzo Pieralisi

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=20160225160533.GA3596@red-moon \
    --to=lorenzo.pieralisi@arm.com \
    --cc=arnd@arndb.de \
    --cc=bhelgaas@google.com \
    --cc=catalin.marinas@arm.com \
    --cc=helgaas@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=will.deacon@arm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.