lkml.org 
[lkml]   [2015]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] genirq: Fix bad IRQ_ONSHOT in forced IRQ setting
From
From: Marc Zyngier <marc.zyngier@arm.com>
Date: Fri, 18 Sep 2015 11:03:12 +0100
> On Fri, 18 Sep 2015 18:22:07 +0900
> Kohji Okuno <okuno.kohji@jp.panasonic.com> wrote:
>
>> From: Thomas Gleixner <tglx@linutronix.de>
>> Date: Fri, 18 Sep 2015 11:04:23 +0200
>> > That's weird. The flow is:
>> >
>> > interrupt()
>> > mask()
>> > ret = primary_handler()
>> > if (ret == WAKE_THREAD)
>> > wake_thread()
>> > else
>> > unmask()
>> >
>> > thread_handler()
>> > ....
>> > unmask()
>> >
>> > So if an interrupt is triggered on the device while the interrupt is
>> > masked it should be raised again immediately when the unmask happens
>> > because its level type.
>> >
>> > I'm wondering why that doesn't work.
>>
>> Yes. I think so. And, I have just found that sdhci_thread_irq() don't
>> finish in this case. I'm analyzing about this now. But, after I apply
>> my patch, sdhci_thread_irq() can finish. I will share the result with
>> you.
>
> What do you mean exactly by "don't finish"? Does it hang somewhere? Or
> keeps processing data but never drains?
>
> Thanks,
>
> M.

Hi Marc and tglx,

irq thread(runs sdhci_thread_irq()) is waiting on
drivers/mmc/core/core.c:mmc_wait_for_req_done() in order to access
a SDIO register. And, this thread shoud be woken up from
sdhci_irq() after the completion of the register access.
But, since the IRQ is masked, sdhci_irq() is not called and irq
thread can not wake up. This is root cause, I think.
What do you think about this?

Best regards,
Kohji Okuno



\
 
 \ /
  Last update: 2015-09-18 13:21    [W:0.052 / U:2.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site