mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Douglas Anderson <dianders@chromium.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	chintanpandya@google.com, 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 08:49:06 +0100	[thread overview]
Message-ID: <86plgdeyrx.wl-maz@kernel.org> (raw)
In-Reply-To: <20250512173250.1.If5c00cf9f08732f4af5f104ae59b8785c7f69536@changeid>

Hey Doug,

On Tue, 13 May 2025 01:32:52 +0100,
Douglas Anderson <dianders@chromium.org> wrote:
> 
> The IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND flag doesn't work properly if the
> IRQ disable depth is not 0 or 1 at suspend time. In this case, the
> IRQ's depth will be decremented but the IRQ won't be enabled to wake
> the system up. Add a special case for when we're suspending and always
> enable the IRQ in that case.

For my own edification, can you explain why you end-up in this
situation? Because I think I can see a use case for the current
behaviour, where a driver controls whether it wants to use this
interrupt as a wake-up source or not dynamically, irrespective of the
underlying chip's capabilities (which I suspect is pinctrl-msm).

This is also consistent with the way disable_irq() nests, making
IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND the equivalent of an enable_irq()
call.

I have the feeling this outlines an issue in the endpoint driver, more
than a core code deficiency.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

  reply	other threads:[~2025-05-13  7:49 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 [this message]
2025-05-13 14:31   ` Doug Anderson
2025-05-13 23:02 ` Brian Norris
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=86plgdeyrx.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=chintanpandya@google.com \
    --cc=dianders@chromium.org \
    --cc=linux-kernel@vger.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®