From: Brian Norris <briannorris@chromium.org>
To: Douglas Anderson <dianders@chromium.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
chintanpandya@google.com, Marc Zyngier <maz@kernel.org>,
Maulik Shah <quic_mkshah@quicinc.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] genirq/PM: Fix IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND if depth > 1
Date: Tue, 13 May 2025 16:02:26 -0700 [thread overview]
Message-ID: <aCPPgiamOQSSHH-m@google.com> (raw)
In-Reply-To: <20250512173250.1.If5c00cf9f08732f4af5f104ae59b8785c7f69536@changeid>
On Mon, May 12, 2025 at 05:32:52PM -0700, Doug Anderson wrote:
> --- a/kernel/irq/chip.c
> +++ b/kernel/irq/chip.c
> @@ -272,7 +272,7 @@ int irq_startup(struct irq_desc *desc, bool resend, bool force)
> const struct cpumask *aff = irq_data_get_affinity_mask(d);
> int ret = 0;
>
> - desc->depth = 0;
> + desc->depth--;
I'm certainly no expert here, but I'm treading on the same code and ran
into a problem with this line too. It seems wise to make this a
decrement, and not an unconditional 0. But I'm not sure that we should
then proceed to unmask an interrupt that might have depth==1 in the
general case. I think we should defer the unmask until we actually reach
0.
In fact, that's one aspect of the very problem I'm dealing with here:
Subject: [PATCH 0/2] genirq: Retain disable-depth across irq_{shutdown,startup}()
https://lore.kernel.org/all/20250513224402.864767-1-briannorris@chromium.org/
It seems to me (again, not an expert) that maybe you need to solve your
problems by dodging the disable-depth entirely. But I'm not sure the
best way to do that.
>
> if (irqd_is_started(d)) {
> irq_enable(desc);
Brian
next prev parent reply other threads:[~2025-05-13 23:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-13 0:32 Douglas Anderson
2025-05-13 7:49 ` Marc Zyngier
2025-05-13 14:31 ` Doug Anderson
2025-05-13 23:02 ` Brian Norris [this message]
2025-06-10 16:43 ` Doug Anderson
2025-06-14 19:01 ` Thomas Gleixner
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=aCPPgiamOQSSHH-m@google.com \
--to=briannorris@chromium.org \
--cc=chintanpandya@google.com \
--cc=dianders@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=quic_mkshah@quicinc.com \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®