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


Groups > linux.kernel > #1680522 > unrolled thread

Re: [linux-next][PATCH] usb: dwc3: omap: remove IRQ_NOAUTOEN used with shared irq

Started byGrygorii Strashko <grygorii.strashko@ti.com>
First post2017-07-03 20:30 +0200
Last post2017-07-04 15:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [linux-next][PATCH] usb: dwc3: omap: remove IRQ_NOAUTOEN used  with shared irq Grygorii Strashko <grygorii.strashko@ti.com> - 2017-07-03 20:30 +0200
    Re: [linux-next][PATCH] usb: dwc3: omap: remove IRQ_NOAUTOEN used  with shared irq Vignesh R <vigneshr@ti.com> - 2017-07-04 15:00 +0200

#1680522 — Re: [linux-next][PATCH] usb: dwc3: omap: remove IRQ_NOAUTOEN used with shared irq

FromGrygorii Strashko <grygorii.strashko@ti.com>
Date2017-07-03 20:30 +0200
SubjectRe: [linux-next][PATCH] usb: dwc3: omap: remove IRQ_NOAUTOEN used with shared irq
Message-ID<tZegF-57Q-1@gated-at.bofh.it>

On 07/02/2017 11:27 PM, Vignesh R wrote:
> Hi,
> 
> On Saturday 01 July 2017 01:04 AM, Strashko, Grygorii wrote:
>>
>>
>> On 06/29/2017 01:03 AM, Tony Lindgren wrote:
>>> * Vignesh R <vigneshr@ti.com> [170628 21:21]:
>>>>
>>>>
>>>> On Thursday 29 June 2017 05:01 AM, Strashko, Grygorii wrote:
>>>>> IRQ_NOAUTOEN can't be used with shared IRQs and Kernel now will triggers
>>>>> warning if it happns, since commit 04c848d39879 ("genirq: Warn when
>>>>> IRQ_NOAUTOEN is used with shared interrupts"). And this is the case for
>>>>> OMAP DWC 3 driver.
>>>>>
>>>>> Hence, remove IRQ_NOAUTOEN flag and instead call disable_irq() before
>>>>> disabling PM runtime in probe error path handling.
>>>>
>>>> Or, how about requesting the irq at the end of probe after extcon
>>>> registration?
>>>
>>> Hmm yeah, what prevents the issue that we tried to fix with commit
>>> 12a7f17fac5b ("usb: dwc3: omap: fix race of pm runtime with irq handler
>>> in probe")?
>>
>> No, I think. There should be the disable_irq() call any way
>> before pm_runtime_put_sync(dev);| pm_runtime_disable(dev); -
>> once IRQ is requested driver can't know if IRQ handler is running now or not
>> unless it will call disable_irq()/free_irq().
>>
>> But, I've also thought about moving request_irq() down (seems
>> it can be moved even after of_platform_populate()).
>> looks like it can be separate patch.
>>
> 
> commit 12a7f17fac5b says PM runtime can race with IRQ handler when
> deferred probing happening due to extcon, therefore IRQ_NOAUTOEN was set
> and disable_irq() call was added. If IRQ handler registration is moved
> to a place after of_platform_populate(), then we can be sure that extcon
> is registered and there wont be any deferred probe or race with irq
> handler and PM runtime. Would disable_irq() still be needed then?
> 

You might be correct, so feel free to send a patch.

-- 
regards,
-grygorii

[toc] | [next] | [standalone]


#1680950

FromVignesh R <vigneshr@ti.com>
Date2017-07-04 15:00 +0200
Message-ID<tZvAU-8l6-55@gated-at.bofh.it>
In reply to#1680522
Hi,

On 7/3/2017 11:58 PM, Grygorii Strashko wrote:
> 
> 
> On 07/02/2017 11:27 PM, Vignesh R wrote:
>> Hi,
>>
>> On Saturday 01 July 2017 01:04 AM, Strashko, Grygorii wrote:
>>>
>>>
>>> On 06/29/2017 01:03 AM, Tony Lindgren wrote:
>>>> * Vignesh R <vigneshr@ti.com> [170628 21:21]:
>>>>>
>>>>>
>>>>> On Thursday 29 June 2017 05:01 AM, Strashko, Grygorii wrote:
>>>>>> IRQ_NOAUTOEN can't be used with shared IRQs and Kernel now will
>>>>>> triggers
>>>>>> warning if it happns, since commit 04c848d39879 ("genirq: Warn when
>>>>>> IRQ_NOAUTOEN is used with shared interrupts"). And this is the
>>>>>> case for
>>>>>> OMAP DWC 3 driver.
>>>>>>
>>>>>> Hence, remove IRQ_NOAUTOEN flag and instead call disable_irq() before
>>>>>> disabling PM runtime in probe error path handling.
>>>>>
>>>>> Or, how about requesting the irq at the end of probe after extcon
>>>>> registration?
>>>>
>>>> Hmm yeah, what prevents the issue that we tried to fix with commit
>>>> 12a7f17fac5b ("usb: dwc3: omap: fix race of pm runtime with irq handler
>>>> in probe")?
>>>
>>> No, I think. There should be the disable_irq() call any way
>>> before pm_runtime_put_sync(dev);| pm_runtime_disable(dev); -
>>> once IRQ is requested driver can't know if IRQ handler is running now
>>> or not
>>> unless it will call disable_irq()/free_irq().
>>>
>>> But, I've also thought about moving request_irq() down (seems
>>> it can be moved even after of_platform_populate()).
>>> looks like it can be separate patch.
>>>
>>
>> commit 12a7f17fac5b says PM runtime can race with IRQ handler when
>> deferred probing happening due to extcon, therefore IRQ_NOAUTOEN was set
>> and disable_irq() call was added. If IRQ handler registration is moved
>> to a place after of_platform_populate(), then we can be sure that extcon
>> is registered and there wont be any deferred probe or race with irq
>> handler and PM runtime. Would disable_irq() still be needed then?
>>
> 
> You might be correct, so feel free to send a patch.

Ok, will send a patch moving irq registration after of_platform_populate().

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web