From: Thomas Gleixner <tglx@linutronix.de>
To: Max Filippov <jcmvbkbc@gmail.com>, linux-kernel@vger.kernel.org
Cc: Chris Zankel <chris@zankel.net>, Max Filippov <jcmvbkbc@gmail.com>
Subject: Re: [PATCH] irqchip/irq-xtensa-pic: clean up
Date: Fri, 08 Dec 2023 14:55:51 +0100 [thread overview]
Message-ID: <87r0jwssrc.ffs@tglx> (raw)
In-Reply-To: <20231205101307.1303186-1-jcmvbkbc@gmail.com>
On Tue, Dec 05 2023 at 02:13, Max Filippov wrote:
> - get rid of the cached_irq_mask variable
> - make mask/unmask operations atomic
> - use BIT() macro instead of bit shifts
> - drop .disable and .enable as they are equivalent to the default
> implementations
> static void xtensa_irq_mask(struct irq_data *d)
> {
> - cached_irq_mask &= ~(1 << d->hwirq);
> - xtensa_set_sr(cached_irq_mask, intenable);
> -}
> + unsigned long flags;
> + u32 irq_mask;
>
> -static void xtensa_irq_unmask(struct irq_data *d)
> -{
> - cached_irq_mask |= 1 << d->hwirq;
> - xtensa_set_sr(cached_irq_mask, intenable);
> + local_irq_save(flags);
All of these callbacks are invoked with interrupts disabled already. No
point in disabling them some more.
> + irq_mask = xtensa_get_sr(intenable);
> + irq_mask &= ~BIT(d->hwirq);
> + xtensa_set_sr(irq_mask, intenable);
> + local_irq_restore(flags);
> }
Thanks,
tglx
prev parent reply other threads:[~2023-12-08 13:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-05 10:13 [PATCH] irqchip/irq-xtensa-pic: clean up Max Filippov
2023-12-08 13:55 ` Thomas Gleixner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r0jwssrc.ffs@tglx \
--to=tglx@linutronix.de \
--cc=chris@zankel.net \
--cc=jcmvbkbc@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox