Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp280864rdb; Thu, 18 Jan 2024 03:30:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IFBopDVg2HGF2RdCyS5L8oEOweCnv13Zp6q8P8qFCtQ8Z/htMxOAdUQVHoscXPQ1N5kyS5l X-Received: by 2002:a17:906:1eca:b0:a28:bf58:756d with SMTP id m10-20020a1709061eca00b00a28bf58756dmr374696ejj.128.1705577425100; Thu, 18 Jan 2024 03:30:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705577425; cv=pass; d=google.com; s=arc-20160816; b=HG1f6c1iSefEBQ6HPRcGH0XZ267IK66m32jxTw6JJz9HNAHXCjaa4QetrNJE95o30A PZzcG+KoHiCOnkRn6MAWyebGhZBGzrPQ042U7O8eqF/HKRjFSyeoHRXfNjZI9W1gAck5 VuY1UeIYQhMwlzI4XIEEs0pDM6qOXaST3nwmyd70OE5XzmyVoXZ6p1Q+6g6gl9fzvAv7 JNOL269DByXAjbhMnDp+KsVKQhWLPnJqrIVUEP6oVONslNXWgyicc48JMwzDc7M66u26 uSSOsut3+5iIxr/OL1fuV3dGggssHwSpNLBR0mHjWq3z7fli914BvqUk6tJdea7212FD Qlww== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=feedback-id:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=RnqXMCYyLDNhaYuY5nzJ2icCjq4NyU0x3TFruSPXCRA=; fh=fhl29VgcwdOsneTlbOdSMck1eQdlOQed/8OKKjpLkTo=; b=ZkmyasJAlwDa997zfQEoAq2f5dOcLnZKV43ACEyTgVqSrsYNrA3srcKWw+WM/+7caD 5HkFv7edDVDquqtCilAGCs1KwReaRvT5D/JV4Wjlw6QihSeLZyTrjSvHGpODaupAnqlz wreqpOEukz/AIXoBqZeykpeuvk312+/kf4RucA/+y/SJpEHeo/A74tyc2B538VoNqaKt A5O9+1yDlMlqHczTOX5NyrJ48lPgMYb8GdXqBSMhTcDNo8teu3CW0hNisS38GmeOCVkU h/rOfMTeOTHnlsEUTGDgR1CULDYICTtPRRYO0lMGbnyESchx72AMrw1fGo5j2xVCv7Ai Ijjg== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=shingroup.cn dmarc=pass fromdomain=shingroup.cn); spf=pass (google.com: domain of linux-kernel+bounces-30053-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30053-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=shingroup.cn Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id n16-20020a170906089000b00a28f023581csi6870086eje.630.2024.01.18.03.30.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 03:30:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-30053-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=shingroup.cn dmarc=pass fromdomain=shingroup.cn); spf=pass (google.com: domain of linux-kernel+bounces-30053-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30053-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=shingroup.cn 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 am.mirrors.kernel.org (Postfix) with ESMTPS id D78651F239B6 for ; Thu, 18 Jan 2024 11:30:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CCC0424B3D; Thu, 18 Jan 2024 11:30:10 +0000 (UTC) Received: from smtpbg154.qq.com (smtpbg154.qq.com [15.184.224.54]) (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 D0E5924B37 for ; Thu, 18 Jan 2024 11:30:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=15.184.224.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705577410; cv=none; b=X3IHwm0mPAvEN8fhHZVHdSCwyI7K7Hyj+wkxafPj2fYUSrHPqvCEDVuUDPL+1fKl2De8XKtwnks9h7wXDCo+8FBeNKmOF+LujPdLZdEOnGndN/7Si/YIeGENGmitpy7HY+50s1vHBz8MfPBA873D1Yzk3p3TAzAetUgiTUGu5cU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705577410; c=relaxed/simple; bh=sZRxiKPZbRZd+nZlIZp3YhXFKhPnZo9TfDEOQiXJZmg=; h=X-QQ-mid:X-QQ-Originating-IP:Received:X-QQ-SSF:X-QQ-FEAT: X-QQ-GoodBg:X-BIZMAIL-ID:From:To:Cc:Subject:Date:Message-Id: X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-QQ-SENDSIZE:Feedback-ID; b=bb5sK71/BXM9d0QwgfRrr8s9u6+N/VXLvGgCuP7+ioIkgkvXeAMNln5a0GwER1Xqha+lMF+yHRici8kBafLMWqfN8+Cl5Yn02jH86aW3lGdG2jlR9nfj4NlA/Hp0+XTAXMWJM4uUL29r0PAVaxdffExoUmRz78/hoB7a8/ukmDQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=shingroup.cn; spf=pass smtp.mailfrom=shingroup.cn; arc=none smtp.client-ip=15.184.224.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=shingroup.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=shingroup.cn X-QQ-mid: bizesmtp64t1705577375tqna5agw X-QQ-Originating-IP: b06gOG+G3Lt6KugAxVb03XfVjcun9/KJ61laat0Gq3c= Received: from localhost ( [183.209.108.228]) by bizesmtp.qq.com (ESMTP) with id ; Thu, 18 Jan 2024 19:29:33 +0800 (CST) X-QQ-SSF: 01400000000000504000000A0000000 X-QQ-FEAT: LE7C6P2vL8RlqSltv7bKQonFxSrBkzY45rkHE2qduRISj3gifYQW1NYxZmPvm jHGnf7gO9u3FjRdCcBL0zlG8ieH1YMhRfmqHS2tnadsqgbBg8VnfcyID4sbmW0oH9RtE7+n yIRx53YSXX/pLkKIGZ0Y/5eJy1dRzUbFy7N2/rqZKJbTE8LQqTCp+g/xyDDBKM4/TqWwFCV XUeAnS9rFCMSBbNjDCg64oPEhzMXL9PPVS6mVxFl4Aemhe+mvcJPFEK6ucRYxI6ddfpsr5F JA2i5LfP/9bw5M8Z/djr/oh3MdS2FhOX4mQGwKNl83LEDY/ftM0F5+0NHHwPLmhrUO+RhVR PFDVLSdG1EZHm+K+YMNj2iISep7xUzqOebY2U/mBtz9E0b7hmlC79WQhWW5rZr4DrtWb0K1 7dFuZyjWMA4= X-QQ-GoodBg: 2 X-BIZMAIL-ID: 10466252816895752989 From: Dawei Li To: tglx@linutronix.de, maz@kernel.org Cc: sdonthineni@nvidia.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dawei.li@shingroup.cn, set_pte_at@outlook.com Subject: [PATCH 2/4] irqchip/gic: Implement generic gic_irq() API for GIC & GIC-v3 Date: Thu, 18 Jan 2024 19:27:37 +0800 Message-Id: <20240118112739.2000497-3-dawei.li@shingroup.cn> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20240118112739.2000497-1-dawei.li@shingroup.cn> References: <20240118112739.2000497-1-dawei.li@shingroup.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:shingroup.cn:qybglogicsvrgz:qybglogicsvrgz5a-1 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; -} - static inline bool gic_irq_in_rdist(struct irq_data *d) { switch (get_intid_range(d)) { diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c index 412196a7dad5..0d559effa172 100644 --- a/drivers/irqchip/irq-gic.c +++ b/drivers/irqchip/irq-gic.c @@ -162,11 +162,6 @@ static inline void __iomem *gic_cpu_base(struct irq_data *d) return gic_data_cpu_base(gic_data); } -static inline unsigned int gic_irq(struct irq_data *d) -{ - return d->hwirq; -} - static inline bool cascading_gic_irq(struct irq_data *d) { void *data = irq_data_get_irq_handler_data(d); -- 2.27.0