linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] PCI: iproc: Support DT property for ignoring aborts when probing
Date: Sun, 17 Apr 2016 16:02:13 +0200	[thread overview]
Message-ID: <5420659.scnjID7ZLn@wuerfel> (raw)
In-Reply-To: <79DC79A7-D4CE-4983-B1C5-CBD2E9CBBFB9@gmail.com>

On Sunday 10 April 2016 18:43:52 Florian Fainelli wrote:
> >+#ifdef CONFIG_ARM
> >+static int iproc_pcie_abort_handler(unsigned long addr, unsigned int
> >fsr,
> >+                                  struct pt_regs *regs)
> >+{
> >+      if (fsr == 0x1406)
> >+              return 0;
> >+
> >+      return 1;
> 
> As you later noted this prevents this driver from being a module now. Since the expectation is that either a fixed bootloader or a platform should enot produce these data aborts, or allow them to be ignored, why not just put this code back where it belongs in the machine specific file which kills many birds with the same stone:
> 
> - code is ways built-in, and hook_fault_code is installed prior to PCIe loading (function is marked with __init)
> - platforms which do not need that, just do not install it for that specific code
> - it is clear which platforms need it and which do not, yet the driver remains agnostic
> 
> NB: there could be other platforms some day needing that which also propagate the error differently, forcing you to add more and more of these codes in the PCIe driver.
> 

I think ideally the driver should be able to access some of its internal
registers to figure out what really happened, but the handler above doesn't
do that, it just silently ignores *any* errors based on the fsr.

Could one of you check the datasheets for the iproc PCI hardware to
see if there are any error handling registers we may want to use to
further drill down on what went wrong and whether it is safe to ignore
the CPU fault?

	Arnd

  parent reply	other threads:[~2016-04-17 14:02 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-09 21:50 [PATCH 1/2] PCI: iproc: Support DT property for ignoring aborts when probing Rafał Miłecki
2016-04-09 21:50 ` [PATCH 2/2] PCI: iproc: Enable hooking abort handler on devices with bcma Rafał Miłecki
2016-04-10  2:59 ` [PATCH 1/2] PCI: iproc: Support DT property for ignoring aborts when probing kbuild test robot
2016-04-10 10:54   ` Rafał Miłecki
2016-04-11  1:43 ` Florian Fainelli
2016-04-11 20:06   ` Ray Jui
2016-04-11 21:55     ` Florian Fainelli
2016-04-11 22:24       ` Ray Jui
2016-04-11 22:26         ` Scott Branden
2016-04-11 22:34           ` Ray Jui
2016-04-11 22:41             ` Florian Fainelli
2016-04-11 22:51               ` Ray Jui
2016-04-11 22:51                 ` Florian Fainelli
2016-04-17 15:54                   ` Rafał Miłecki
2016-04-17 14:02   ` Arnd Bergmann [this message]
2016-04-18 17:47     ` Ray Jui
2016-04-20 18:18       ` Ray Jui
2016-10-28 15:31         ` Rafał Miłecki
2016-10-28 16:58           ` Ray Jui
2016-10-28 17:04             ` Florian Fainelli
2016-10-29  6:14             ` Rafał Miłecki
2016-04-11  8:57 ` Mark Rutland
2016-04-17 15:43   ` Rafał Miłecki

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=5420659.scnjID7ZLn@wuerfel \
    --to=arnd@arndb.de \
    --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).