From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5DD3F606A33E for ; Thu, 3 Dec 2026 11:18:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=pcfL6nLH; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=FrdMYagE DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=kFF4gtA7f1QlQ635tgd3Guopr1CFwozuEg6NoS/46h0=; b=pcfL6nLHG23XvtApmKvu4STDga V05RLibYLGuya6KMkwtTQ6FpB5zuP0iIGVg+XrZl3w8Vn78Tk7KFsInl1LRm1b+yOwYBuZZIpsQ7a oX5wFVHNTAPOoW/OlZdyrHEVvxAnFvBWJF2MviY4LjXFsyl3u6iOUIs99T/QT+mbiGNAtmK2B7hIG smR2LlJnglJI6BpDOorkS+tKxtUXWUKzXRicENqvVu3fSR/rewbZefHN0GXdqUTqj6TPjn3Iu7sOm eYz+Nq2LigqLKCV2rRInwihw9d5ZMxVefeSlItezyxQPPCNkXCzZTiAUqLVnS56245Wjbq5HlhmG/ iwMfi4VA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZ4pS-0000000EMtW-225v; Thu, 03 Dec 2026 11:18:22 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZ4pL-0000000EMru-1hf8 for linux-arm-kernel@lists.infradead.org; Thu, 03 Dec 2026 11:18:16 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id DAC0E4557C; Thu, 3 Dec 2026 11:18:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1DF4A1F00896; Thu, 3 Dec 2026 11:18:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796296692; bh=kFF4gtA7f1QlQ635tgd3Guopr1CFwozuEg6NoS/46h0=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=FrdMYagEtajndN2zd8AzksJRwYqd3tO7QPlu4nxOAYJksJzmxR/TIcFhsbMQgTb04 veTC06VgotdPQPWNt/PEqw0hYJpT8JBuLrJH4OkEUmboBMy5vhh/6B1olCJGb909Uk PvVkOCc1SYChwNdPATC0EOFn/PCwabyW86vWUkZs+uo3r/2jcGJU6p3/O81z+ujcLo hzoSB2dvOg/wP/8HJ0gpqP0k07EVCXNxuEn+xwWmHErc6Tm+IbYKo0asvj4GM51JZ0 VcUXOEdkqeb9YA7PGdgDYwOn9PvkcpBJn+zQub6E1fchAkj2PD9fnJj+t1O4XPZY+t IhzxXDmA4tCqQ== Date: Thu, 3 Dec 2026 12:18:08 +0100 From: Lorenzo Pieralisi To: Vladimir Murzin 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() Message-ID: References: <20261203095338.111945-1-vladimir.murzin@arm.com> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261203095338.111945-1-vladimir.murzin@arm.com> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-15.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 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 > --- > 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() ? Thanks, Lorenzo > + > + 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); > } > > static void gicv5_ppi_irq_mask(struct irq_data *d) > @@ -733,7 +735,7 @@ static int gicv5_irq_spi_domain_alloc(struct irq_domain *domain, unsigned int vi > irq_set_probe(virq); > irqd_set_single_target(irqd); > > - gicv5_hwirq_init(hwirq, GICV5_IRQ_PRI_MI, GICV5_HWIRQ_TYPE_SPI); > + gicv5_hwirq_set_priority(hwirq, GICV5_IRQ_PRI_MI, GICV5_HWIRQ_TYPE_SPI); > > return 0; > } > @@ -824,7 +826,7 @@ static int gicv5_irq_lpi_domain_alloc(struct irq_domain *domain, unsigned int vi > NULL, handle_fasteoi_irq, NULL, NULL); > irqd_set_single_target(irqd); > > - gicv5_hwirq_init(hwirq, GICV5_IRQ_PRI_MI, GICV5_HWIRQ_TYPE_LPI); > + gicv5_hwirq_set_priority(hwirq, GICV5_IRQ_PRI_MI, GICV5_HWIRQ_TYPE_LPI); > gicv5_lpi_config_reset(irqd); > } > > -- > 2.34.1 >