All of lore.kernel.org
 help / color / mirror / Atom feed
From: ray.jui@broadcom.com (Ray Jui)
To: linux-arm-kernel@lists.infradead.org
Subject: 4.4 BCM5301X ARM regression "External imprecise Data abort"
Date: Fri, 8 Apr 2016 15:41:11 -0700	[thread overview]
Message-ID: <18d2b4ec-c607-c651-999d-40ec5fa5bbf1@broadcom.com> (raw)
In-Reply-To: <CACna6rxU8g2HsgYO=X953RFBSxbmmrGhms+gUpwDdhfmgoBmGA@mail.gmail.com>



On 4/8/2016 3:11 PM, Rafa? Mi?ecki wrote:
> On 9 April 2016 at 00:08, Ray Jui <ray.jui@broadcom.com> wrote:
>> On 4/8/2016 3:05 PM, Rafa? Mi?ecki wrote:
>>>
>>> On 9 April 2016 at 00:02, Ray Jui <ray.jui@broadcom.com> wrote:
>>>>
>>>> On 4/8/2016 1:43 AM, Lucas Stach wrote:
>>>>>
>>>>>
>>>>> Am Freitag, den 08.04.2016, 08:45 +0200 schrieb Rafa? Mi?ecki:
>>>>>>
>>>>>>
>>>>>> On 4 April 2016 at 23:23, Hauke Mehrtens <hauke@hauke-m.de> wrote:
>>>>>>>
>>>>>>>
>>>>>>> On 04/04/2016 11:08 PM, Scott Branden wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>> On 16-04-03 11:13 PM, Rafa? Mi?ecki wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> I got regression reports from Netgear R8000 (BCM4709A0) users and
>>>>>>>>> did
>>>>>>>>> some testing & regression tracking with Aditya.
>>>>>>>>>
>>>>>>>>> It happens that Linux 4.4 doesn't boot due to the following commits:
>>>>>>>>> bbeb920 ("ARM: 8422/1: enable imprecise aborts during early kernel
>>>>>>>>> startup")
>>>>>>>>> 9254970 ("ARM: 8447/1: catch pending imprecise abort on unmask")
>>>>>>>>> 937b123 ("ARM: BCM5301X: remove workaround imprecise abort fault
>>>>>>>>> handler")
>>>>>>>>>
>>>>>>>>> In kernel 4.3 we got that abort workaround which was resulting in:
>>>>>>>>> [    5.007128] Freeing unused kernel memory: 212K (c0435000 -
>>>>>>>>> c046a000)
>>>>>>>>> [    5.694632] init: Console is alive
>>>>>>>>> [    5.698169] init: - watchdog -
>>>>>>>>> [    5.701470] External imprecise Data abort at addr=0x0, fsr=0x1406
>>>>>>>>> ignored.
>>>>>>>>> As you can see, this abort was happening soon after freeing unused
>>>>>>>>> memory and ignoring it *once* did the trick. It was never appearing
>>>>>>>>> again.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> I assume it only can throw one of these and if it is deactivated it
>>>>>>> will
>>>>>>> ignore the next one or overwrite it. So it could be that more than one
>>>>>>> is thrown here.
>>>>>>>
>>>>>>>>> With 4.4 similar (or the same?) abort happens earlier (during PCI
>>>>>>>>> host
>>>>>>>>> driver init) and doesn't get ignored:
>>>>>>>>> [    2.478461] pci 0000:00:00.0: PCI bridge to [bus 01]
>>>>>>>>> [    2.483451] pci 0000:00:00.0:   bridge window [mem
>>>>>>>>> 0x08000000-0x085fffff]
>>>>>>>>> [    2.599449] pcie_iproc_bcma bcma0:8: PCI host bridge to bus
>>>>>>>>> 0001:00
>>>>>>>>> [    2.605744] pci_bus 0001:00: root bus resource [mem
>>>>>>>>> 0x40000000-0x47ffffff]
>>>>>>>>> [    2.612657] pcie_iproc_bcma bcma0:8: link: UP
>>>>>>>>> [    2.617241] PCI: bus0: Fast back to back transfers disabled
>>>>>>>>> [    2.622845] pci 0001:00:00.0: bridge configuration invalid ([bus
>>>>>>>>> 00-00]), reconfiguring
>>>>>>>>> [    2.631297] PCI: bus1: Fast back to back transfers disabled
>>>>>>>>> [    2.636887] pci 0001:01:00.0: bridge configuration invalid ([bus
>>>>>>>>> 00-00]), reconfiguring
>>>>>>>>> [    2.645035] Unhandled fault: imprecise external abort (0x1406) at
>>>>>>>>> 0x00000000
>>>>>>>>> (see 4.4.txt for the backtrace)
>>>>>>>>>
>>>>>>>>> At first I was hoping that we simply need to re-add the removed
>>>>>>>>> workaround. I tried it but it appeared that one abort is immediately
>>>>>>>>> followed by another:
>>>>>>>>> [    2.936895] pci 0001:01:00.0: bridge configuration invalid ([bus
>>>>>>>>> 00-00]), reconfiguring
>>>>>>>>> [    2.945053] External imprecise Data abort at addr=0x0, fsr=0x1406
>>>>>>>>> ignored.
>>>>>>>>> [    2.951966] Unhandled fault: imprecise external abort (0x1406) at
>>>>>>>>> 0x00000000
>>>>>>>>>
>>>>>>>>> So it seems that commits bbeb920 and 9254970 broke something in PCI
>>>>>>>>> host initialization (or maybe just exposed another bug?). Instead of
>>>>>>>>> getting an abort once and late we are getting now many of them and a
>>>>>>>>> bit earlier.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> These commits mad the kernel earlier "listen" to such errors, so that
>>>>>>> they will be shown at the time they occur and not sometime later.
>>>>>>
>>>>>>
>>>>>>
>>>>>> So AFAIU with kernel 4.3:
>>>>>> 1) Aborts were masked (silent) until "Freeing unused kernel memory"
>>>>>> 2) There was one (silent) abort caused by a bootloader
>>>>>> 3) There were likely multiple aborts (silent) during early PCI init
>>>>>> 4) After unmasking we got only a single abort reported and we were
>>>>>> ignoring it
>>>>>>
>>>>>> With kernel 4.4:
>>>>>> 1) All aborts are reported immediately
>>>>>> 2) Abort caused by a bootloader gets ignored by ARM code:
>>>>>> "Hit pending asynchronous external abort (FSR=0x00001c06) during first
>>>>>> unmask"
>>>>>> thanks to 9254970 ("ARM: 8447/1: catch pending imprecise abort on
>>>>>> unmask")
>>>>>> 3) There are still multiple aborts during PCI init (reported
>>>>>> immediately
>>>>>> now)
>>>>>> 4) To work as before (in 4.3) we should ignore all aborts, not only the
>>>>>> 1st one
>>>>>>
>>>>>> Of course proposed solution is an ugly workaround, we should have no
>>>>>> aborts reported in the first place.
>>>>>>
>>>>> A master abort on the PCI bus during probe of the PCI config space
>>>>> (device enumeration) is expected. Most host bridges ignore those errors
>>>>> and just return 0 for the read transaction.
>>>>>
>>>>> Some bridges forward the error onto the AXI/AMBA bus and thus cause
>>>>> imprecise external aborts on the ARM core.
>>>>
>>>>
>>>>
>>>> Yes, I suspect this is the case for these imprecise external abort
>>>> triggered
>>>> by the iProc PCIe.
>>>>
>>>>> If your host bridge doesn't
>>>>> have a way to disable error forwarding during PCI bus probe you need to
>>>>> install an abort handler. Most implementations based on the designware
>>>>> PCIe core do this already.
>>>>
>>>>
>>>>
>>>> Is this as simple as registering an abort handler to the hook in the
>>>> iProc
>>>> PCIe driver, and based on the fsr (0x1406 in our case), simply ignore the
>>>> abort by returning zero from the abort handler?
>>>
>>>
>>> This is what I did in OpenWrt an hour ago and it seems to be working:
>>>
>>> http://git.openwrt.org/?p=openwrt.git;a=commitdiff;h=f823c5da71f0dd859facc5ece575a48c28279d35
>>>
>>
>> It looks good to me except that I think you should register the hook in
>> "iproc_pcie_setup" so both the BCMA and platform based iProc PCIe drivers
>> can use it.
>
> Should I add some new field to struct iproc_pcie, like "bool
> hook_abort_handler"?
>

You want to enable/disable them based on platforms? I don't see a need 
at this point...

Thanks,

Ray

  reply	other threads:[~2016-04-08 22:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-04  6:13 4.4 BCM5301X ARM regression "External imprecise Data abort" Rafał Miłecki
2016-04-04 21:08 ` Scott Branden
2016-04-04 21:23   ` Hauke Mehrtens
2016-04-08  6:45     ` Rafał Miłecki
2016-04-08  8:43       ` Lucas Stach
2016-04-08 22:02         ` Ray Jui
2016-04-08 22:05           ` Rafał Miłecki
2016-04-08 22:08             ` Ray Jui
2016-04-08 22:11               ` Rafał Miłecki
2016-04-08 22:41                 ` Ray Jui [this message]
2016-04-08 22:53                   ` Rafał Miłecki
2016-04-09  0:00                     ` Ray Jui
     [not found] ` <CAC3K-4pHw1YQbcD2pp3eaJp0o5OSO+Ft0B_0o1y6uRCJGxGhaw@mail.gmail.com>
2016-04-07 18:48   ` 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=18d2b4ec-c607-c651-999d-40ec5fa5bbf1@broadcom.com \
    --to=ray.jui@broadcom.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 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.