[PATCH] soc: ti: knav_qmss_queue: Use IRQF_NO_AUTOEN flag in request_irq()
Jinjie Ruan
ruanjinjie at huawei.com
Fri Sep 13 21:02:25 PDT 2024
On 2024/9/14 2:14, Nishanth Menon wrote:
> On 11:38-20240912, Jinjie Ruan wrote:
>> disable_irq() after request_irq() still has a time gap in which
>> interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will
>> disable IRQ auto-enable when request IRQ.
>
> does it explicitly disable the irq?
Not really, it just not enable it at startup.
1506 static int
1507 __setup_irq(unsigned int irq, struct irq_desc *desc, struct
irqaction *new)
[...]
1782 >------->-------if (!(new->flags & IRQF_NO_AUTOEN) &&
1783 >------->------- irq_settings_can_autoenable(desc)) {
1784 >------->------->-------irq_startup(desc, IRQ_RESEND, IRQ_START_COND);
1785 >------->-------} else {
1786 >------->------->-------/*
1787 >------->------->------- * Shared interrupts do not go well with
disabling
1788 >------->------->------- * auto enable. The sharing interrupt might
request
1789 >------->------->------- * it while it's still disabled and then
wait for
1790 >------->------->------- * interrupts forever.
1791 >------->------->------- */
1792 >------->------->-------WARN_ON_ONCE(new->flags & IRQF_SHARED);
1793 >------->------->-------/* Undo nested disables: */
1794 >------->------->-------desc->depth = 1;
1795 >------->-------}
>>
>> Fixes: 41f93af900a2 ("soc: ti: add Keystone Navigator QMSS driver")
>
> Not a fixes. at least not a fix when the code was introduced in 2014 and
> the flag was introduced in 2015.
OK, let me remove the fix tag and update the commit message and resend.
>
>> Signed-off-by: Jinjie Ruan <ruanjinjie at huawei.com>
>> ---
>> drivers/soc/ti/knav_qmss_queue.c | 5 ++---
>> 1 file changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c
>> index f2055a76f84c..9c8d2f13b947 100644
>> --- a/drivers/soc/ti/knav_qmss_queue.c
>> +++ b/drivers/soc/ti/knav_qmss_queue.c
>> @@ -119,11 +119,10 @@ static int knav_queue_setup_irq(struct knav_range_info *range,
>>
>> if (range->flags & RANGE_HAS_IRQ) {
>> irq = range->irqs[queue].irq;
>> - ret = request_irq(irq, knav_queue_int_handler, 0,
>> - inst->irq_name, inst);
>> + ret = request_irq(irq, knav_queue_int_handler, IRQF_NO_AUTOEN,
>> + inst->irq_name, inst);
>> if (ret)
>> return ret;
>> - disable_irq(irq);
>> if (range->irqs[queue].cpu_mask) {
>> ret = irq_set_affinity_hint(irq, range->irqs[queue].cpu_mask);
>> if (ret) {
>> --
>> 2.34.1
>>
>
More information about the linux-arm-kernel
mailing list