Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2845668lqp; Mon, 25 Mar 2024 10:50:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUeSsKmGSiJqmYoWC/XxtjtsCKRM26YS6PqKrX7uPhACa5qf/oFlj0J6n5tzYpiFlaiKdG+t06Dx0wOeIaTUxWJqnpYBhDAOcoVY81ZFg== X-Google-Smtp-Source: AGHT+IFoq3mcpprEOsUlNnhUlZXHUwvcNH3y654wmBjoJbzw5FuXFv6TY3VRA54eiTkAkISc+2Zc X-Received: by 2002:a17:90a:8c06:b0:2a0:6503:599c with SMTP id a6-20020a17090a8c0600b002a06503599cmr3336001pjo.20.1711389003149; Mon, 25 Mar 2024 10:50:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711389003; cv=pass; d=google.com; s=arc-20160816; b=luYl+MxyiXO4GJpa1llIuqbctUjw/GqJ+2d7DbLecOS5wl+Q4uxCg+30vbqZ0ZyFlk 0WKlZ/vEAZeNkeRI5mZbeSpk7i0Lkn+NODyxQXcdco+usJiuHVWuRGKKZLjaEtdtEYaG 9frnyAtTQK/Getm2xJ4jZV+h+6L0s3LDKoLpjXedTDs2HwpygZv4QIOgsno9icHAHfZm lLd8bLEMFEjI7rIhx+/Z//ifIGL/hdJ3KzqdEdU8Fe3dXzmhO40Kpl5uMvlMZjWejUB6 3AgwXoPXZCs4xSXIT5c9JAcVp83PpObfDSX+4xFd3qgyKI0a9Reer8mUKBZoCTTjYoFA BR3w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:cc:subject:to:reply-to:sender:from:dkim-signature :dkim-signature:date; bh=PSl27hYqmhD11De4k++XRL2xdjLPYz8sRLTC4lTNNmY=; fh=J2jwCqdUhGdgbokEZE8sEmtCHsfJWTM2cf4MM8EfLP0=; b=m9TTdTNjEOKgjFGWga+/OtoMbheJjHBLjvPp2Q/5PGrn16gzSYu5n8I1JsTM9nc6FV n/W2IjCdmr2PM+uOurSwxI5bKeHCo5D9qUmpN5Hbf3C5J18VsCgEcbAdR0LdEYYH/A7D 4tHekhAAAR41/J1d9c0Bd01F+zf6zH7oyOJA6+ckCpXsLvfKMpZlAKAnkyd/agCo4Yvs kIxticIssEeGpPuXaeo/sGSymsOaE1xkSIHBRHDLncg7dIi8ilmu4nAuMymdwt/H7Gwh GLoJyC3Gril459/ZXy0KVYNgQrgmODQ8lg9FZ/Pa+ALOF6wgZ/SoZS+LM+rv4eL3iabL hMEA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=4xWT2khX; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=pkCHKb17; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-117504-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117504-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id g4-20020a17090ae58400b002a00ea248e2si7907435pjz.127.2024.03.25.10.50.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 10:50:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-117504-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=4xWT2khX; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=pkCHKb17; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-117504-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117504-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 574852C4B4C for ; Mon, 25 Mar 2024 17:42:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C937914C58B; Mon, 25 Mar 2024 16:46:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="4xWT2khX"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="pkCHKb17" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 0B50E14A4F9; Mon, 25 Mar 2024 16:46:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711385216; cv=none; b=eDiEuJzs5sqhDFtaRd2T6R6vLqFU83dTiNvZGKLjCqPhrAd5iypVLxZJasnToOLIpO83fJgEAUJy+CMXEu/cgrzKlyMbWsrDpHCrHEVzMTGiW1rw9yU44YuWGms2f7Wo6clMqz9svZ+1HE2HImQEshAbW+wjyS8PgfJ6ihZ78DM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711385216; c=relaxed/simple; bh=J+36lp0gdXkJUsBG/bMVoEt5BGuwFPhWNWXFyIVqWZU=; h=Date:From:To:Subject:Cc:MIME-Version:Message-ID:Content-Type; b=T6DycFmRXTxnAGWSUmZzd5824iGXiroJzK7H6p9w8vFHYhCXMj50/VAeKOsWV6cvcL+ghowefRn8Ij3gzq0lNiRcez+nbfIiTHIRTW+boNuREmFdQ3Fc6X8OfEPMkSKDleJdJUZyYCJcPuxyMwAU5RI5G8xt8bWpZKuX27VFEvc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=4xWT2khX; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=pkCHKb17; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Mon, 25 Mar 2024 16:46:52 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1711385213; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PSl27hYqmhD11De4k++XRL2xdjLPYz8sRLTC4lTNNmY=; b=4xWT2khXRV+wMvS2DS0qKvq6Jaz8rbSWEp9cJqKLrZXXsMW/gFqDLK6+rg3ITBz3m+Czkw 7IePGCnz4wWaTsaiZi9jHMZu22DvdHbT+BiHCIkusj+oGx3wfvHZgih8lujhcBL0q44anj SnT/EHQsD+m6c3fxNVhhxnjpNCVCY7/9Sc9A70CWBW9VbGAX0i/9U7fovPu63ItehjNBZ+ QydDPFgwqae1BUmJbr18yS//RNOBtN5ISSD1g6w19pX6n4Gxp7lB6T77Sa5T4i3pmkvwDJ 4YOHG5f6Hu8RBoBKMtk8RNU5sXoSy4/PemxNy3svwCboNGrQnM4DMu2Y1jHIxA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1711385213; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PSl27hYqmhD11De4k++XRL2xdjLPYz8sRLTC4lTNNmY=; b=pkCHKb177HcHjb9t1f8Ixyc0H3MxQGnV/S7YYmk0G/Unp6z1BNWpU3oPMlUxmr8Y8lqFg+ hGqkqFODwt1ZYxCA== From: "tip-bot2 for Biju Das" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/core] irqchip/renesas-rzg2l: Simplify rzg2l_irqc_irq_{en,dis}able() Cc: Biju Das , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org, maz@kernel.org Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <171138521269.10875.198902082430228575.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit The following commit has been merged into the irq/core branch of tip: Commit-ID: 46efb3053f4f23357e9e29f8abaa6f801d956a0c Gitweb: https://git.kernel.org/tip/46efb3053f4f23357e9e29f8abaa6f801d956a0c Author: Biju Das AuthorDate: Mon, 18 Mar 2024 08:50:41 Committer: Thomas Gleixner CommitterDate: Mon, 25 Mar 2024 17:38:28 +01:00 irqchip/renesas-rzg2l: Simplify rzg2l_irqc_irq_{en,dis}able() Simplify rzg2l_irqc_irq_{en,dis}able() by moving common code to rzg2l_tint_irq_endisable(). Signed-off-by: Biju Das Signed-off-by: Thomas Gleixner --- drivers/irqchip/irq-renesas-rzg2l.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/drivers/irqchip/irq-renesas-rzg2l.c b/drivers/irqchip/irq-renesas-rzg2l.c index ae67fec..f6484bf 100644 --- a/drivers/irqchip/irq-renesas-rzg2l.c +++ b/drivers/irqchip/irq-renesas-rzg2l.c @@ -138,7 +138,7 @@ static void rzg2l_irqc_eoi(struct irq_data *d) irq_chip_eoi_parent(d); } -static void rzg2l_irqc_irq_disable(struct irq_data *d) +static void rzg2l_tint_irq_endisable(struct irq_data *d, bool enable) { unsigned int hw_irq = irqd_to_hwirq(d); @@ -151,30 +151,24 @@ static void rzg2l_irqc_irq_disable(struct irq_data *d) raw_spin_lock(&priv->lock); reg = readl_relaxed(priv->base + TSSR(tssr_index)); - reg &= ~(TIEN << TSSEL_SHIFT(tssr_offset)); + if (enable) + reg |= TIEN << TSSEL_SHIFT(tssr_offset); + else + reg &= ~(TIEN << TSSEL_SHIFT(tssr_offset)); writel_relaxed(reg, priv->base + TSSR(tssr_index)); raw_spin_unlock(&priv->lock); } +} + +static void rzg2l_irqc_irq_disable(struct irq_data *d) +{ + rzg2l_tint_irq_endisable(d, false); irq_chip_disable_parent(d); } static void rzg2l_irqc_irq_enable(struct irq_data *d) { - unsigned int hw_irq = irqd_to_hwirq(d); - - if (hw_irq >= IRQC_TINT_START && hw_irq < IRQC_NUM_IRQ) { - struct rzg2l_irqc_priv *priv = irq_data_to_priv(d); - u32 offset = hw_irq - IRQC_TINT_START; - u32 tssr_offset = TSSR_OFFSET(offset); - u8 tssr_index = TSSR_INDEX(offset); - u32 reg; - - raw_spin_lock(&priv->lock); - reg = readl_relaxed(priv->base + TSSR(tssr_index)); - reg |= TIEN << TSSEL_SHIFT(tssr_offset); - writel_relaxed(reg, priv->base + TSSR(tssr_index)); - raw_spin_unlock(&priv->lock); - } + rzg2l_tint_irq_endisable(d, true); irq_chip_enable_parent(d); }