From: "Sven Peter" <sven@svenpeter.dev>
To: "Nick Chan" <towinchenmi@gmail.com>,
"Hector Martin" <marcan@marcan.st>,
"Alyssa Rosenzweig" <alyssa@rosenzweig.io>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Marc Zyngier" <maz@kernel.org>,
asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org
Subject: Re: [PATCH] irqchip/apple-aic: Only handle PMC interrupt as FIQ when configured to fire FIQ
Date: Sat, 18 Jan 2025 13:24:47 +0100 [thread overview]
Message-ID: <aef452c6-1e12-4510-8fb9-1dc597cf69bf@app.fastmail.com> (raw)
In-Reply-To: <20250117170227.45243-1-towinchenmi@gmail.com>
Hi,
On Fri, Jan 17, 2025, at 18:02, Nick Chan wrote:
> The CPU PMU in Apple SoCs can be configured to fire its interrupt in one
> of several ways, and since Apple A11 one of the method is FIQ. Only handle
> the PMC interrupt as a FIQ when the CPU PMU has been configured to fire
> FIQs.
>
> Cc: stable@vger.kernel.org
> Fixes: c7708816c944 ("irqchip/apple-aic: Wire PMU interrupts")
> Signed-off-by: Nick Chan <towinchenmi@gmail.com>
> ---
> drivers/irqchip/irq-apple-aic.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/irqchip/irq-apple-aic.c
> b/drivers/irqchip/irq-apple-aic.c
> index da5250f0155c..c3d435103d6d 100644
> --- a/drivers/irqchip/irq-apple-aic.c
> +++ b/drivers/irqchip/irq-apple-aic.c
> @@ -577,7 +577,8 @@ static void __exception_irq_entry
> aic_handle_fiq(struct pt_regs *regs)
> AIC_FIQ_HWIRQ(AIC_TMR_EL02_VIRT));
> }
>
> - if (read_sysreg_s(SYS_IMP_APL_PMCR0_EL1) & PMCR0_IACT) {
> + if (read_sysreg_s(SYS_IMP_APL_PMCR0_EL1) &
> + (FIELD_PREP(PMCR0_IMODE, PMCR0_IMODE_FIQ) | PMCR0_IACT)) {
That's a somewhat unusual way to use FIELD_PREP and I'm not sure the
expression even does what you want. It's true when only PMCR0_IACT is set and
your commit description mentions that you only when to handle these when
FIQ have been configured. Am I missing something here?
Best,
Sven
next prev parent reply other threads:[~2025-01-18 12:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-17 17:02 Nick Chan
2025-01-18 12:24 ` Sven Peter [this message]
2025-01-18 14:48 ` Nick Chan
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=aef452c6-1e12-4510-8fb9-1dc597cf69bf@app.fastmail.com \
--to=sven@svenpeter.dev \
--cc=alyssa@rosenzweig.io \
--cc=asahi@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcan@marcan.st \
--cc=maz@kernel.org \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=towinchenmi@gmail.com \
/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®