Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp368741rdb; Thu, 18 Jan 2024 06:10:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IH9dpYZxTJngMGcQjPTt0QCIWMGIzH/3huU+fPsrfb/n/bz4Kto+sNPBs1IVvSyZt1N5RgE X-Received: by 2002:a05:6e02:152:b0:361:9723:4657 with SMTP id j18-20020a056e02015200b0036197234657mr972069ilr.35.1705587025457; Thu, 18 Jan 2024 06:10:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705587025; cv=pass; d=google.com; s=arc-20160816; b=DGvyD/xw4fzDwszLxnro5KAV8ID+gEhZPCKKecDWK2iuNPWK+65mqSmLNg6UUwPmqW Ma7WllyU/FWfHP+neg9GxHTf8HPURgOn6EfVehEBweBB+dEYjzg/kiGmwrbwiU+WfMdQ 6CoHF/ZJgVMclUyj1VyxkZnOb4LQuCxeYN8aEkCpN7GhcAdbuNMt31YG0n+6bOjtIhb9 bLXs0pYD1wccxlRmKfoZgOrpXG7vLUHVGbQ2vIY6DsUNC3c1pPbp5tYYgPedj1HWj8lr 5dmg3ochfPf7cTnEEpGAHLxx1n6sB2L5RrDyNC6JXKOv1GDlabVmt3HPA+PxJ/lY4yoS AEMA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:references:in-reply-to:subject:cc:to:from:message-id :date:dkim-signature; bh=te4Y00Otto7klgnoqqWT6d6FAiDchOPrvLYx5tNmn64=; fh=KHEDJX/Z02cKYuV1YTaKeoZxSrGuIoLuEjHT/r1MzBc=; b=GPl5kllw09zSfFRdxDQDLq1fFtCS3Dbhn6ZpXr21UQNruMQez4wsHnYOe1BPcmZDvU UJlTmpY7VH4zFych23zxMVkGU0+SV6a7szjFo98vhsaFve39Wu9UZWL1GrgoBvLmUwP2 qY92slhyxj8X0JSiFXhuc8ZrVDGIW+RB0kckjxX+r0BdShElfu8CC39bj5g1bRS4Plc5 i2wRKiKJjp2Uyyy19WFGeHJzFvgWwRdOFbYCjLr1kmr6ZWSLKJN+hhFyknHhrEWcCH3p Pp18KQAQB/VkoK8CESKVCE25OEN3t2EoxY6+kpKVl7j9pZret9MNq6PBWx/GeFBOiACN ngNw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MyZ1lXKP; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-30178-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30178-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id x30-20020a63485e000000b005b95ccd1b4dsi1516263pgk.82.2024.01.18.06.10.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 06:10:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-30178-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MyZ1lXKP; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-30178-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30178-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id B2252B26CD7 for ; Thu, 18 Jan 2024 14:03:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 05BE22576D; Thu, 18 Jan 2024 14:03:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MyZ1lXKP" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 312C725756 for ; Thu, 18 Jan 2024 14:03:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705586591; cv=none; b=RnGsrSWFrj91jnLODSJ54GtREs3AZHmbU6W0e1gDy8R0q9GnYCxnqcn0CZgo+Ve8358U5N5SttK8O2Hn2gCNolhM3oTnDACk9vif97eOU3Tl9AfYnnbfDBZ8W9vkxY8nfcObkMvq+7Wdzb8oLi1LcmOYLPyUYlqx34XqkN4tfHI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705586591; c=relaxed/simple; bh=uhV16wnieYwv/Ds4uqX9IBESqkQ1oFL+RjEaWA4KddM=; h=Received:DKIM-Signature:Received:Date:Message-ID:From:To:Cc: Subject:In-Reply-To:References:User-Agent:MIME-Version: Content-Type:X-SA-Exim-Connect-IP:X-SA-Exim-Rcpt-To: X-SA-Exim-Mail-From:X-SA-Exim-Scanned; b=DvbWsx+8R2HFMesRsHajr3oKiXQSvFsNThnDWxOvTrQJBzBIkG5S8ucsFATjmXd+iPQhHsISDZaTWvxA/S+RFYZvctRF6n8gtXQjdtlA8yE8eS6RcSihp6+m/ePNImAybviFy2UKz5bsp6DtcVcEdhp6eumtRfMs+KyxBLEcU2Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MyZ1lXKP; arc=none smtp.client-ip=10.30.226.201 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) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII 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 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.