From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F3F59C4707B for ; Thu, 18 Jan 2024 14:03:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=esK3SahEmzt8Xw3nGAGwvAZjhFcCBLXToWJYK5RfDg0=; b=JUp+ln/m56VZiy alUiKItwPzXNobYnw5dxntZXJ8MeLq3/pJe2Yb01/EdfF8iQqTcNd+phCT/YqI2p3LPNudjM3kR01 +nLyj8ta25r6LU1U1bN1dRn+PRGi4lDQjBdUmHF4GdzZKcPxtANaPj+NtEiLlz1UJUNUwwLTMt8m4 STsIXrG6q6G6ucrQ9Kpogj/xBhsVR7IZY9dPxPmPHZ8zuuMmG7VeLG+3Td5EZBByPH9LblLJ0LQUA 0kOI94VIulNEGM54HR3grj4aejTF03hj3ORvnyNdi0qM5pFC3gklz19sTJgD+wJTn8CVB6OVeS+j4 fT8jvoY95JCK0aBJmDog==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rQSzC-002udp-2M; Thu, 18 Jan 2024 14:03:14 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rQSz9-002uce-2w for linux-arm-kernel@lists.infradead.org; Thu, 18 Jan 2024 14:03:13 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 58D3E60A56; Thu, 18 Jan 2024 14:03:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07E9BC433F1; Thu, 18 Jan 2024 14:03:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705586591; bh=uhV16wnieYwv/Ds4uqX9IBESqkQ1oFL+RjEaWA4KddM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=MyZ1lXKP28PLpAfX//g87ugprOgymDbZMag0oNDVMYCk8JKdUtEdD+sF72DnS2770 77465tOUq48RHtBN/m44kWSbYTlolVN15q2zyNhkhz0aaCF5rRpXv9nLAtJlb2rphi 81crClnuY4BADUX7O3xjW596AMKNXB08yQ2NGLLevivW8a8GmTZod8x67ngnJldTzR +CYH6hkXiloFSTxCafkOz7JGGeGSH49ccPslYZCvAUvDBCvV1ihi+K4QlB9HXX5aDa AOxaAFCkPNKHcJ9fBCpF6laWVb925tPzMFwcoAxm22qiBsgIMzTTAwAw3snBEIbfTg ox/CzKJFPS5IA== Received: from sofa.misterjones.org ([185.219.108.64] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rQSz6-00CiJP-Rb; Thu, 18 Jan 2024 14:03:08 +0000 Date: Thu, 18 Jan 2024 14:03:08 +0000 Message-ID: <87zfx2wxgj.wl-maz@kernel.org> From: Marc Zyngier To: Dawei Li Cc: tglx@linutronix.de, sdonthineni@nvidia.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, set_pte_at@outlook.com Subject: Re: [PATCH 2/4] irqchip/gic: Implement generic gic_irq() API for GIC & GIC-v3 In-Reply-To: <20240118112739.2000497-3-dawei.li@shingroup.cn> References: <20240118112739.2000497-1-dawei.li@shingroup.cn> <20240118112739.2000497-3-dawei.li@shingroup.cn> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: dawei.li@shingroup.cn, tglx@linutronix.de, sdonthineni@nvidia.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, set_pte_at@outlook.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240118_060311_992464_936E0795 X-CRM114-Status: GOOD ( 19.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 18 Jan 2024 11:27:37 +0000, Dawei Li wrote: > > GIC & GIC-v3 share same gic_irq() implementations, unify them into a > generic API. > > Signed-off-by: Dawei Li > --- > drivers/irqchip/irq-gic-common.h | 5 +++++ > drivers/irqchip/irq-gic-v3.c | 5 ----- > drivers/irqchip/irq-gic.c | 5 ----- > 3 files changed, 5 insertions(+), 10 deletions(-) > > diff --git a/drivers/irqchip/irq-gic-common.h b/drivers/irqchip/irq-gic-common.h > index f407cce9ecaa..ed18db4ab2c5 100644 > --- a/drivers/irqchip/irq-gic-common.h > +++ b/drivers/irqchip/irq-gic-common.h > @@ -19,6 +19,11 @@ struct gic_quirk { > u32 mask; > }; > > +static inline unsigned int gic_irq(struct irq_data *d) > +{ > + return d->hwirq; > +} > + > int gic_configure_irq(unsigned int irq, unsigned int type, > void __iomem *base, void (*sync_access)(void)); > void gic_dist_config(void __iomem *base, int gic_irqs, > diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c > index b9d9375a3434..474a498a521e 100644 > --- a/drivers/irqchip/irq-gic-v3.c > +++ b/drivers/irqchip/irq-gic-v3.c > @@ -181,11 +181,6 @@ static enum gic_intid_range get_intid_range(struct irq_data *d) > return __get_intid_range(d->hwirq); > } > > -static inline unsigned int gic_irq(struct irq_data *d) > -{ > - return d->hwirq; > -} > - I'd rather not do that. If anything, I'd get rid of the helper altogether, as we have irqd_to_hwirq() that does the same job, and actually preserves the typing. M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel