From: Marek Vasut <marek.vasut@gmail.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-pci <linux-pci@vger.kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Wolfram Sang <wsa@the-dreams.de>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
m-karicheri2@ti.com
Subject: Re: [PATCH V2] PCI: rcar: Add L1 link state fix into data abort hook
Date: Mon, 5 Oct 2020 10:00:25 +0200 [thread overview]
Message-ID: <668471a3-af14-e083-bed9-722015546830@gmail.com> (raw)
In-Reply-To: <CAMuHMdWtj=c=y7a2+W10HgYNj3rh2P6nSDd-j4RKKuUiztCxjA@mail.gmail.com>
On 10/5/20 9:31 AM, Geert Uytterhoeven wrote:
> Hi Marek,
Hi,
> On Sun, Oct 4, 2020 at 4:16 PM Marek Vasut <marek.vasut@gmail.com> wrote:
>> On 9/28/20 11:35 AM, Geert Uytterhoeven wrote:
>> [...]
>>>> +static int __init rcar_pcie_init(void)
>>>> +{
>>>> +#ifdef CONFIG_ARM_LPAE
>>>> + hook_fault_code(17, rcar_pcie_aarch32_abort_handler, SIGBUS, 0,
>>>> + "asynchronous external abort");
>>>> +#else
>>>> + hook_fault_code(22, rcar_pcie_aarch32_abort_handler, SIGBUS, 0,
>>>> + "imprecise external abort");
>>>> +#endif
>>>
>>> As there can be only a single handler, this may interfere with a handler
>>> for another platform in a multi-platform kernel.
>>> Hence I think this should not be done unconditionally, but be moved to
>>> the driver's .probe() callback.
>>
>> Why is nobody doing this in the probe code then ? It seems all the other
>
> drivers/pci/controller/dwc/pci-keystone.c is:
>
> ks_pcie_probe()
> ks_pcie_add_pcie_port()
> dw_pcie_host_init()
> pp->ops->host_init(pp) = ks_pcie_host_init()
> hook_fault_code()
Well that one is interesting. I wonder whether that driver has the same
LPAE bug (different fault code for LPAE and non-LPAE configuration) we
found here too, since it is used on CA15 TI SoCs.
>> drivers which hook fault code do it in init as well. I can imagine that
>
> Probably nobody bothered exercising the external abort handler on
> multi-platform kernels?
>
>> something might trip the fault handler even before probe is called, e.g.
>> some PM handling or simply user accessing that PCIe area using setpci.
>
> If that is the case, it must indeed by done earlier, but still
> conditional on the presence of the actual PCIe controller.
I am open to suggestions how to do that part.
next prev parent reply other threads:[~2020-10-05 8:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-26 16:09 [PATCH V2] PCI: rcar: Add L1 link state fix into data abort hook marek.vasut
2020-09-27 8:29 ` Sergei Shtylyov
2020-10-04 14:10 ` Marek Vasut
2020-09-28 9:35 ` Geert Uytterhoeven
2020-10-04 14:14 ` Marek Vasut
2020-10-05 7:31 ` Geert Uytterhoeven
2020-10-05 8:00 ` Marek Vasut [this message]
2020-10-05 8:07 ` Geert Uytterhoeven
2020-10-07 18:29 ` Rob Herring
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=668471a3-af14-e083-bed9-722015546830@gmail.com \
--to=marek.vasut@gmail.com \
--cc=bhelgaas@google.com \
--cc=geert@linux-m68k.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=m-karicheri2@ti.com \
--cc=wsa@the-dreams.de \
--cc=yoshihiro.shimoda.uh@renesas.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 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).