linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Jim Quinlan <james.quinlan@broadcom.com>
Cc: Jim Quinlan <jim2101024@gmail.com>,
	"open list:PCI NATIVE HOST BRIDGE AND ENDPOINT DRIVERS" 
	<linux-pci@vger.kernel.org>, Bjorn Helgaas <bhelgaas@google.com>,
	Nicolas Saenz Julienne <nsaenzjulienne@suse.de>,
	"maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE" 
	<bcm-kernel-feedback-list@broadcom.com>,
	Nicolas Saenz Julienne <nsaenz@kernel.org>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Rob Herring <robh@kernel.org>,
	Florian Fainelli <f.fainelli@gmail.com>,
	"moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" 
	<linux-rpi-kernel@lists.infradead.org>,
	"moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" 
	<linux-arm-kernel@lists.infradead.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1 3/4] PCI: brcmstb: Add panic/die handler to RC driver
Date: Tue, 25 May 2021 16:17:15 -0500	[thread overview]
Message-ID: <20210525211715.GA1230916@bjorn-Precision-5520> (raw)
In-Reply-To: <CA+-6iNzDCXokrHjVL=vdTT=cMV52tSSk9=L7h8QsCA=sf1pZiw@mail.gmail.com>

On Tue, May 25, 2021 at 05:05:51PM -0400, Jim Quinlan wrote:
> On Tue, May 25, 2021 at 4:40 PM Bjorn Helgaas <helgaas@kernel.org> wrote:
> > On Tue, Apr 27, 2021 at 01:51:38PM -0400, Jim Quinlan wrote:
> > > Whereas most PCIe HW returns 0xffffffff on illegal accesses and the like,
> > > by default Broadcom's STB PCIe controller effects an abort.  This simple
> > > handler determines if the PCIe controller was the cause of the abort and if
> > > so, prints out diagnostic info.
> > >
> > > Example output:
> > >   brcm-pcie 8b20000.pcie: Error: Mem Acc: 32bit, Read, @0x38000000
> > >   brcm-pcie 8b20000.pcie:  Type: TO=0 Abt=0 UnspReq=1 AccDsble=0 BadAddr=0
> >
> > What happens to the driver that performed the illegal access?
> 
> The entire system dies from the abort.  Some customers elect to do a
> fixup in the abort handler but we admonish them to fix the root cause.
> With these patches we at least get immediate information about the
> access that caused the abort.
> >
> > Does this mean that errors that are recoverable on other hardware (by
> > noticing the 0xffffffff and checking for error) are fatal on the
> > Broadcom STB?
> 
> Yes.  For example, I have an old Rocketport RP2 card I sometimes use
> for testing.   On a Broadcom STB it dies when the rp2 probe does a
> read after calling rp2_reset_asic().  On an x86, 0xffffffff is
> returned on this read and all is well.
> 
> I don't think there is any PCIe spec that mandates an access error
> returns 0xffffffff.  Some of our SOCs have a new feature where we can
> return the 0xffffffff instead of getting an abort.  We will allow the
> customer to turn this on if they ask for it, but for the time being we
> prefer an abort as many drivers do not check for 0xffffffff.

Right, the mechanism of error reporting is an implementation choice.
Few drivers are actually prepared to deal with 0xffffffff data, but in
many systems, especially those with removable PCI devices, it is
important to be able to report errors in a way that doesn't crash the
system.

That may not be a concern in your system, so maybe just mention that
this is a fatal error for the system in the commit log.

Bjorn

  reply	other threads:[~2021-05-25 21:17 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-27 17:51 [PATCH v1 0/4] PCI: brcmstb: Add panic handler and shutdown func Jim Quinlan
2021-04-27 17:51 ` [PATCH v1 1/4] PCI: brcmstb: Check return value of clk_prepare_enable() Jim Quinlan
2021-04-27 17:51 ` [PATCH v1 2/4] PCI: brcmstb: Give 7216 SOCs their own config type Jim Quinlan
2021-04-27 17:51 ` [PATCH v1 3/4] PCI: brcmstb: Add panic/die handler to RC driver Jim Quinlan
2021-05-25 20:40   ` Bjorn Helgaas
2021-05-25 21:05     ` Jim Quinlan
2021-05-25 21:17       ` Bjorn Helgaas [this message]
2021-04-27 17:51 ` [PATCH v1 4/4] PCI: brcmstb: add shutdown call to driver Jim Quinlan
2021-04-27 19:35   ` Florian Fainelli
2021-05-25 21:18   ` Bjorn Helgaas
2021-05-25 21:40     ` Jim Quinlan
2021-05-26 16:11     ` Rob Herring
2021-05-26 17:03     ` Florian Fainelli
2021-06-03 17:23       ` Bjorn Helgaas
2021-06-03 17:30         ` Florian Fainelli
2021-06-03 20:58           ` Bjorn Helgaas
2021-06-03 21:01             ` Florian Fainelli
2021-05-25 18:01 ` [PATCH v1 0/4] PCI: brcmstb: Add panic handler and shutdown func Florian Fainelli
2021-06-03 16:32 ` Lorenzo Pieralisi
2021-06-03 17:31   ` Jim Quinlan
2021-06-04  9:22     ` 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=20210525211715.GA1230916@bjorn-Precision-5520 \
    --to=helgaas@kernel.org \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bhelgaas@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=james.quinlan@broadcom.com \
    --cc=jim2101024@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=nsaenz@kernel.org \
    --cc=nsaenzjulienne@suse.de \
    --cc=robh@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).