[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51276875-658e-e6fe-5433-b5d795b253ff@redhat.com>
Date: Thu, 1 Jul 2021 00:09:58 +0200
From: Javier Martinez Canillas <javierm@...hat.com>
To: Bjorn Helgaas <helgaas@...nel.org>
Cc: linux-kernel@...r.kernel.org,
Peter Robinson <pbrobinson@...il.com>,
Shawn Lin <shawn.lin@...k-chips.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Heiko Stuebner <heiko@...ech.de>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Rob Herring <robh@...nel.org>,
linux-arm-kernel@...ts.infradead.org, linux-pci@...r.kernel.org,
linux-rockchip@...ts.infradead.org,
Michal Simek <michal.simek@...inx.com>,
Jingoo Han <jingoohan1@...il.com>,
Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
linux-tegra@...r.kernel.org
Subject: Re: [PATCH v2] PCI: rockchip: Avoid accessing PCIe registers with
clocks gated
On 6/30/21 10:30 PM, Bjorn Helgaas wrote:
> On Wed, Jun 30, 2021 at 09:59:58PM +0200, Javier Martinez Canillas wrote:
[snip]
>>
>> But maybe you can also add a paragraph that mentions the CONFIG_DEBUG_SHIRQ
>> option and shared interrupts? That way, other driver authors could know that
>> by enabling this an underlying problem might be exposed for them to fix.
>
> Good idea, thanks! I added this; is it something like what you had in
> mind?
>
Thanks a lot for doing this rewording. I just have a small nit for the text.
> Found by enabling CONFIG_DEBUG_SHIRQ, which calls the IRQ handler when it
> is being unregistered. An error during the probe path might cause this
> unregistration and IRQ handler execution before the device or data
> structure init has finished.
>
The IRQ handler is not called when unregistered, but it is called when another
handler for the shared IRQ is unregistered. In this particular driver, both a
"pcie-sys" and "pcie-client" handlers are registered, then an error leads to
"pcie-sys" being unregistered and the handler for "pcie-client" being called.
So maybe the following instead?
Found by enabling CONFIG_DEBUG_SHIRQ, which calls the IRQ handlers when a
handler for the shared IRQ is unregistered. An error during the probe path
might cause this unregistration and handler execution before the device or
data structure init has finished.
Best regards,
--
Javier Martinez Canillas
Software Engineer
New Platform Technologies Enablement team
RHEL Engineering
Powered by blists - more mailing lists