Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1708361

Re: [RFC PATCH] PCI: rockchip: fix system hang up if activate CONFIG_DEBUG_SHIRQ

From jeffy <jeffy.chen@rock-chips.com>
Newsgroups linux.kernel
Subject Re: [RFC PATCH] PCI: rockchip: fix system hang up if activate CONFIG_DEBUG_SHIRQ
Date 2017-08-10 11:30 +0200
Message-ID <ucRWW-3Ia-5@gated-at.bofh.it> (permalink)
References <ucR0S-2S8-21@gated-at.bofh.it> <ucRke-2YH-5@gated-at.bofh.it> <ucRNf-3Bi-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi shawn,

On 08/10/2017 05:14 PM, Shawn Lin wrote:
> Hi Jeffy
>
> On 2017/8/10 16:39, jeffy wrote:
>> Hi shawn,
>>
>> On 08/10/2017 04:21 PM, Shawn Lin wrote:
>>> With CONFIG_DEBUG_SHIRQ enabled, the irq tear down routine
>>> would still access the irq handler registed as a shard irq.
>>> Per the comment within the function of __free_irq, it says
>>> "It's a shared IRQ -- the driver ought to be prepared for
>>> an IRQ event to happen even now it's being freed". However
>>> when failing to probe the driver, it may disable the clock
>>> for accessing the register and the following check for shared
>>> irq state would call the irq handler which accesses the register
>>> w/o the clk enabled. That will hang the system forever.
>>
>> i think this extra irq call is to make sure it's safe to get a shared
>> irq when we are freeing it, and we would not get this irq after freed it.
>>
>> so maybe just call devm_free_irq before disable clks(and other
>> required resources for the irq handler)? and also do it in the
>> rockchip_pcie_remove.
>
> That works since we free it and the following devm_irq_release would
> bail out early. But I know sure if it is the real intention of  the
> devm_  irq stuff,  although devm_free_irq should be called to free the
> IRQ separately if we want. At least that is so explicit that folks will
> know that, as more from the top view, it seems only a little drivers
> there call devm_free_irq for this case by looking into some more
> drivers(Still no any PCIe drivers do that).
>
> Not sure if their systems are robust enough that could access the
> register w/o clk, even without power domain enabled.

maybe we can use request_irq & free_irq directly?

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC PATCH] PCI: rockchip: fix system hang up if activate CONFIG_DEBUG_SHIRQ Shawn Lin <shawn.lin@rock-chips.com> - 2017-08-10 10:30 +0200
  Re: [RFC PATCH] PCI: rockchip: fix system hang up if activate CONFIG_DEBUG_SHIRQ jeffy <jeffy.chen@rock-chips.com> - 2017-08-10 10:50 +0200
    Re: [RFC PATCH] PCI: rockchip: fix system hang up if activate  CONFIG_DEBUG_SHIRQ Shawn Lin <shawn.lin@rock-chips.com> - 2017-08-10 11:20 +0200
      Re: [RFC PATCH] PCI: rockchip: fix system hang up if activate CONFIG_DEBUG_SHIRQ jeffy <jeffy.chen@rock-chips.com> - 2017-08-10 11:30 +0200
  Re: [RFC PATCH] PCI: rockchip: fix system hang up if activate CONFIG_DEBUG_SHIRQ Heiko Stuebner <heiko@sntech.de> - 2017-08-10 11:30 +0200
    Re: [RFC PATCH] PCI: rockchip: fix system hang up if activate CONFIG_DEBUG_SHIRQ jeffy <jeffy.chen@rock-chips.com> - 2017-08-10 11:50 +0200
    Re: [RFC PATCH] PCI: rockchip: fix system hang up if activate  CONFIG_DEBUG_SHIRQ Shawn Lin <shawn.lin@rock-chips.com> - 2017-08-10 13:10 +0200

csiph-web