linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jgunthorpe@obsidianresearch.com (Jason Gunthorpe)
To: linux-arm-kernel@lists.infradead.org
Subject: Armada XP (mvebu) PCIe memory (BAR/window) re-allocation
Date: Tue, 1 Apr 2014 10:41:10 -0600	[thread overview]
Message-ID: <20140401164110.GA26093@obsidianresearch.com> (raw)
In-Reply-To: <CAFJTrDvb7gcLkv8-HqbJSLEj7V2Zg=5+pXFR2r3AZxG7waT6WA@mail.gmail.com>

On Mon, Mar 31, 2014 at 03:17:24PM +0100, Matthew Minter wrote:
> Just to give an update of what I have tried. I noticed that there was
> a PCI quirk available for a similar PLX chip which forced the kernel
> to see the slots as hot-plug slots (unfortunately some PLX chips
> falsely report themselves to be non hotplug capable bridges from my
> understanding). I tried extending this quirk to run on my chip also.
> This significantly changed the results in that along with the use of
> pci=hpmemsize=xM I managed to force the chip to pre-allocate some
> memory for the hotplug slot. Specifically I added this line:
> DECLARE_PCI_FIXUP_HEADER(0x10b5, 0x8617, quirk_hotplug_bridge);
> to linux-3.14-rc7/drivers/pci/quirks.c

This all sounds right to me, it is probably the proper approach,
things could be refined a bit by adding a DT property to indicate hot
plug, but that won't help your oops.

The oops kinda looks like something went wrong during a PCI memory
read.

> Internal error: : 1008 [#1] PREEMPT SMP ARM

Which is a call to die, but the string that should tell us where is ""
There are cases like that in the kernel, but all are prefixed by
another line - did a line go missing (Unhandled Fault perhaps?)

First guess would be something went wrong when the mbus windows were
created after the rescan. Some debugging prints from that part of the
flow might be informative, as well as a dump from the mbus debugfs..

Second guess, something went wrong during the hot plug, and the PLX is
not forwarding TLPs.. lpsci -v might give a clue.

> I am currently working on a way to modify the scan order as Jason as
> suggested, as soon as I have worked out exactly how the scan order is
> determined I will try modifying the DT or any code needed to force the
> port with the PLX chip to be scanned last. However I first need to
> read some more of the code to understand what it orders on, eg: order
> in DT, bus number, memory address.

That suggestion was a hack, you have found the 'proper' way to do hot
plug. If you can resolve this oops you should be golden :)

Jason

  reply	other threads:[~2014-04-01 16:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAFJTrDt7OrtE4B52419F2KGbmXeLR9NEcgF6yMTMUBe5vdKwfg@mail.gmail.com>
2014-03-26 17:06 ` Armada XP (mvebu) PCIe memory (BAR/window) re-allocation Thomas Petazzoni
2014-03-26 17:18   ` Jason Gunthorpe
2014-03-31 14:17     ` Matthew Minter
2014-04-01 16:41       ` Jason Gunthorpe [this message]
2014-04-03  9:31         ` Matthew Minter
     [not found]         ` <CAFJTrDu1=Hoa6NS3DaFphMUXgJYunybbdCoGiBVe1qKNQ4s3MA@mail.gmail.com>
2014-04-03 18:23           ` Jason Gunthorpe
2014-04-03 18:24             ` Thomas Petazzoni
2014-04-07 13:03               ` Matthew Minter
2014-04-07 16:45                 ` Jason Gunthorpe
2014-04-08 10:57                   ` Matthew Minter
2014-04-08 16:34                     ` Jason Gunthorpe
2014-04-03  8:57 Matthew Minter
  -- strict thread matches above, loose matches on Subject: below --
2014-03-26 16:54 Matthew Minter

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=20140401164110.GA26093@obsidianresearch.com \
    --to=jgunthorpe@obsidianresearch.com \
    --cc=linux-arm-kernel@lists.infradead.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).