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 029DEC47422 for ; Fri, 19 Jan 2024 02:03:25 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=eeh8zvWNat6VZCefxXs6u/FRrXO34wlbHEQrqzA0aHk=; b=Y7txhhIGZdaCbA 9DVx4abf8R/yYoXz5UDhUpoZ+k1N4oIbel1z4jSi6RljL/pTY/RdCUj4oE7IMEBfTYusyxDN42ROK 2yd2By943BA/z/AGmcuHYhjErvy1XPPOrwAtngZkeC5iD5HpmhTWbyC5JfTqixQrCWWTXAdxL9KLR R9DJ/FXxbLV39lIyzl6RiHzqZu1m0SUF9DBuojPDHj1a5TD/QMKxgLKc4dr8TiVqMbZTRQRsiah5i 1EE63RWP3pxw5V1g7MxwcE1HONBC4MKodq5rArXGZk3qwjlcF/DeJur7o6YDgRhIWNv40lWKhhQsb v9dDnif9gSCjtUnVKlRw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rQeDe-004GrN-12; Fri, 19 Jan 2024 02:02:54 +0000 Received: from smtpbgjp3.qq.com ([54.92.39.34]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rQeDZ-004Gqg-1A for linux-arm-kernel@lists.infradead.org; Fri, 19 Jan 2024 02:02:52 +0000 X-QQ-mid: bizesmtp84t1705629755tlp4mzkp X-QQ-Originating-IP: /8ayjq+Nkw6x6q5GnjTruT1152L3RVrCOKJ5aW2HuWM= Received: from localhost ( [183.209.108.228]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 19 Jan 2024 10:02:34 +0800 (CST) X-QQ-SSF: 01400000000000504000000A0000000 X-QQ-FEAT: tSQw27OYC23AQknwRbGq6+oPUA9k4bIqDXKu7hduNtZrm3QVBMo/caVQ6weR0 I7EssFZG1LfNXpBoBPyKz+1svjRaH8+4+f09oZILb2GdYQM1nRh+dMxZE+OQu8BAH/wLfpV Wj3YF8soKdxszSisFqMhMrdwe2128bf0MKX8fM8hPo7Kg3sSUqcUK2trsYiQNuyOUM1E2Nu MG8BveBUQQAUVorsoEXBpzse26VUk53S4UgXhpXKshshEakNPaQYKTYYYVeXPjoBjtMXEL8 El06KMwfDlys5p8I1nJ+BBeDzZbb0MJik7wR0lXjCHHz9TCcicKaLtU0DWmqR3kxzUAM77K IN0elUSvuaKN7HJkyl67sTuFr2tX4KU7CyrRFKPxjB1gNpsHJt/aA9m8YH62cDyEGwCRgcd Kb6t4FK89Nc= X-QQ-GoodBg: 2 X-BIZMAIL-ID: 2826556967009872931 Date: Fri, 19 Jan 2024 10:02:33 +0800 From: Dawei Li To: Marc Zyngier 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 Message-ID: <0021C3C0D197C59F+ZanYOXvAxIT1pF0h@centos8> References: <20240118112739.2000497-1-dawei.li@shingroup.cn> <20240118112739.2000497-3-dawei.li@shingroup.cn> <87zfx2wxgj.wl-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87zfx2wxgj.wl-maz@kernel.org> X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:shingroup.cn:qybglogicsvrgz:qybglogicsvrgz5a-1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240118_180249_687217_9FA217DC X-CRM114-Status: GOOD ( 19.29 ) 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 Hi Marc, Thanks for the review. On Thu, Jan 18, 2024 at 02:03:08PM +0000, Marc Zyngier wrote: > 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. Yes, your solution is much better for it's truly generic, independent of irq chip. I will send respin of V2 as you suggested, and if I may, add your suggested-by? Thanks, Dawei > > 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