From: Vladimir Murzin <vladimir.murzin@arm.com>
To: Lorenzo Pieralisi <lpieralisi@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, radu@rendec.net, tglx@kernel.org,
maz@kernel.org
Subject: Re: [PATCH] irqchip/gic-v5: Rename gicv5_hwirq_init() to gicv5_hwirq_set_priority()
Date: Thu, 3 Dec 2026 13:44:28 +0000 [thread overview]
Message-ID: <91d30f76-86bc-4099-b8eb-080826f09751@arm.com> (raw)
In-Reply-To: <axFP8AEhvXVs48WB@red-moon>
On 12/3/26 11:18, Lorenzo Pieralisi wrote:
> On Thu, Dec 03, 2026 at 09:53:38AM +0000, Vladimir Murzin wrote:
>> Since commit a1ee1a1ca75b ("irqchip/gic-v5: Defer default SPI and LPI
>> IAFFID programming"), gicv5_hwirq_init() only sets the interrupt
>> priority. Rename it to reflect its actual functionality.
>>
>> Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
>> ---
>> drivers/irqchip/irq-gic-v5.c | 20 +++++++++++---------
>> 1 file changed, 11 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/irqchip/irq-gic-v5.c b/drivers/irqchip/irq-gic-v5.c
>> index 8c0303af71e7..14ed0c384f72 100644
>> --- a/drivers/irqchip/irq-gic-v5.c
>> +++ b/drivers/irqchip/irq-gic-v5.c
>> @@ -85,16 +85,18 @@ static void gicv5_ppi_priority_init(void)
>> isb();
>> }
>>
>> -static void gicv5_hwirq_init(irq_hw_number_t hwirq, u8 priority, u8 hwirq_type)
>> +static void gicv5_hwirq_set_priority(irq_hw_number_t hwirq, u8 priority, u8 hwirq_type)
>> {
>> u64 cdpri;
>>
>> - if (hwirq_type == GICV5_HWIRQ_TYPE_LPI || hwirq_type == GICV5_HWIRQ_TYPE_SPI) {
>> - cdpri = FIELD_PREP(GICV5_GIC_CDPRI_PRIORITY_MASK, priority) |
>> - FIELD_PREP(GICV5_GIC_CDPRI_TYPE_MASK, hwirq_type) |
>> - FIELD_PREP(GICV5_GIC_CDPRI_ID_MASK, hwirq);
>> - gic_insn(cdpri, CDPRI);
>> - }
>> + if (WARN_ON(hwirq_type != GICV5_HWIRQ_TYPE_LPI && hwirq_type != GICV5_HWIRQ_TYPE_SPI))
>> + return;
> If we want to warn it does not make much sense to make it a runtime one given
> that we always pass in constant values.
>
> Can we make this function always inline and turn this run-time check into
> a BUILD_BUG_ON() ?
>
Absolutely! v2 is on its way!
Cheers
Vladimir
> Thanks,
> Lorenzo
prev parent reply other threads:[~2026-12-03 13:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 9:53 [PATCH] irqchip/gic-v5: Rename gicv5_hwirq_init() to gicv5_hwirq_set_priority() Vladimir Murzin
2026-12-03 11:02 ` Marc Zyngier
2026-12-03 11:18 ` Lorenzo Pieralisi
2026-12-03 13:44 ` Vladimir Murzin [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=91d30f76-86bc-4099-b8eb-080826f09751@arm.com \
--to=vladimir.murzin@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=maz@kernel.org \
--cc=radu@rendec.net \
--cc=tglx@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