Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2286086lqo; Mon, 20 May 2024 00:21:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVvuM9lT6sJWAC9BdeJAdV0flaKyO/WgCyENuj/XyUe/KNyDOVbK0LsbN8keTjsbiPWwudZgcR4Em/3PCWrK9ER//RaQ3zC1DlXlnNQ/g== X-Google-Smtp-Source: AGHT+IG5zNjaJkC6fNzrl+/7ZJrXCEGABHhuDiJZYfTk55S7G1sHceg4QwM9Of+TYnIkrsacaR7J X-Received: by 2002:a05:6a00:2e11:b0:6ed:416d:f7c with SMTP id d2e1a72fcca58-6f4e0299ea9mr33331829b3a.6.1716189661375; Mon, 20 May 2024 00:21:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716189661; cv=pass; d=google.com; s=arc-20160816; b=PB0s942qXy/VC8LA2O9CwHSiecX3+8pHVPfDU3OFqRMPprFGuWlt4X1UehFBJTdoKi Xpr9KcwyP7+PKzVBVXJTedFov7JrTF3Eon+spzXri7cT9LS4bgKkcRU/G3jTgZ9K8XoB NS+FKVa7HKL6IMbnaEV0t01xTL1ra2B3EV/rjfqdsi9sfn180QE+Aq4YmXVPMNqf6NK5 0d3Fm8IvjF0E0nvA1ie/WEBGyqUbtiBpS1YTBTl3ukjJytS0c+sCvhnQgyoKQISD0i4s rpPKF3OMDUtGbwgLTyku5FKzZbvoJF2yRBShf/sNQ/QERA9wawcjLdc0jwm74iCTlbRI 06GA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=NZBUhRNFLDmCI2ChcjlpR99DNWg+Cc8ceERhi6tF0ro=; fh=DyQrJjHjXkjlwp8VcXaB7jm3V692yEsE8zx0L5aSlr4=; b=FPZPuW0ax7Oe8QoiMnlTk4My0QmUSVmb851qJ3VB9rZZXJE7g0XX8wVlg3mOgIk+Y1 z2YG/9IFRpWwxagujkWiwY58LFVaTgzl6cI1HEgHkS1IZdaqHonUaZTgIuIdZl0FPCSr QJLKaLeetr/ocXwthXMPKB6pEmeBqajzFB3iSEWPZYTG5yWvP5x00/1kBPCnt+uGXd53 LrSB6bGHIu1ZLrtPiRXlw+0QGz+Tn8yPYv0cHRuhPPmxqL2IrG4/sjSXsuN4LbqBV6HR +atLHXfp/Ji1rS7DhbKipk/FtYfDW7rdNVol9MBfXELGF+Ty/7mT1m6+OQR1o4cIxiv4 1yQw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=VWy2YJrD; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-183453-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183453-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f4d2a72b25si22100634b3a.50.2024.05.20.00.21.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 00:21:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183453-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=VWy2YJrD; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-183453-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183453-linux.lists.archive=gmail.com@vger.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 0A52DB21402 for ; Mon, 20 May 2024 07:20:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2DD381B813; Mon, 20 May 2024 07:20:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="VWy2YJrD" Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E879CE576 for ; Mon, 20 May 2024 07:20:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716189648; cv=none; b=TpyHB0NtizFcj8dpqKMyGDJHrXEDIFth3nuQXaXRRUzuW3HyvVX9lbtW+LI1j4EJPHh9y/lzTn6lEGst0NACVLq6342Qiwz/2jyY/OAZh+mbHyJE8B0nVYHVl5Xg2/Dg5TuE1ewgjat9RTJYESu7fl4Pk3WEnhMPXO2cTKNVq34= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716189648; c=relaxed/simple; bh=gqIAUbUBH0zrLm1kxTzRh/nI+40++QuEy6cZC2eVlCs=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=oV4n3+RVfHBNKjez3NqeoXaMlOgsxD070sRcIdlU8KmQvKbpmcSqBvT0w1jv3yQhj4qBJ0Ps2HgzUQj6l1ARM9bR/aHqFM0ozBYnDlTHnXYB3Q21MiOflAtZFIdvNx6fbLn0lZDhifxP6npVgScKhwRUWjPeabFKpNni2hDAB0I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=VWy2YJrD; arc=none smtp.client-ip=209.85.167.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-5210684cee6so3306930e87.0 for ; Mon, 20 May 2024 00:20:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1716189644; x=1716794444; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=NZBUhRNFLDmCI2ChcjlpR99DNWg+Cc8ceERhi6tF0ro=; b=VWy2YJrDkuo5GTVgOdg3Di5KaEVvjlYbz2ISbYzR7L1lfW5h/AHaNR9xwse942g3t2 JRDGY8pHIeC+pOkmqHyJKsP1LlsDJacUrZzENQ/hIVQp19xFYZYnelUWkfRPefrG077k FU0uc0LwopogE9cT1f2MgXqG3vGqiVjJrwR9ZHQVbMTxPSsuqCy8/FgF3TvqkkioeVMm H31gFXNPKPL72foU0fP1OTDvlx1aCoUzUXgwwC5jjajdCVBs7x7Di4st0o2kFUHClGWR +tiITXY1fyOXz3PgjJf9XuH6U4Ra1KuOzbuY7/QmVHgXVcjt+1RqwrnmcEKSHlo1j9Lm yqLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716189644; x=1716794444; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=NZBUhRNFLDmCI2ChcjlpR99DNWg+Cc8ceERhi6tF0ro=; b=uB51IOVXZbIqMfpQcy7869uCgbdfBEzJjNxcOlfmqjlEJfJZth28o53sLC9FzVE18c iLA24OUSUOc5zPjOL7pFLctjkPlFDLJmmhqNZWONxLh0H0HkyfRoKiRqkU+W4PT50eB/ x9g5LKq+kYyXFEyHYJElT8iDUEheW8iAc4n5H880E01KAJ3QNtcavIG+FCRS8RZXAQqb pWM50ToUR4Yvfi7i7PJuJfM05a/WcONHmWPt6kfkWRRc2PXpU3IK7cHnXV8hl8QBiSkv fkmjg1YipidDATirmrMOphHbKkxzMHRqEojcJgJQXx3T3y3QHn9qF4Rn346X/aWrj/BP bvdQ== X-Forwarded-Encrypted: i=1; AJvYcCWJZOodsopj8oa8LBB3hvWgtDKWd2LgPkwZZZb3Zqavo7yO8wTstP/vP1UynJDODDfq1V+XWDsZZ3pYyz3/SjuauaiciWOGPMeCTxAI X-Gm-Message-State: AOJu0YymI216psARoqMW35ZUu7ynU8kVwkLVsXoR7XARUHRWw6HKfpxt 25iO+sj6TmGizT7coMy6hAlOSTVWX97tqVJgBnc9r8wjCiBe6VHn2yyeD8skGgyKde5i5fNI7kq dBHo= X-Received: by 2002:a05:6512:3091:b0:51e:f1a6:ac39 with SMTP id 2adb3069b0e04-5220fa71b46mr23227383e87.12.1716189643948; Mon, 20 May 2024 00:20:43 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.22]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-41fccfe1277sm398943205e9.42.2024.05.20.00.20.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 00:20:43 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, linus.walleij@linaro.org, didi.debian@cknow.org, efault@gmx.de Cc: linux-renesas-soc@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, claudiu.beznea@tuxon.dev, linux-rt-users@vger.kernel.org, Claudiu Beznea Subject: [PATCH] pinctrl: renesas: rzg2l: use spin_{lock,unlock}_irq{save,restore} Date: Mon, 20 May 2024 10:20:33 +0300 Message-Id: <20240520072033.228049-1-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Claudiu Beznea On PREEMPT_RT kernels the spinlock_t maps to an rtmutex. Using raw_spin_lock_irqsave()/raw_spin_unlock_irqrestore() on &pctrl->lock.rlock breaks the PREEMPT_RT builds. To fix this use spin_lock_irqsave()/spin_unlock_irqrestore() on &pctrl->lock. Fixes: e1fd1f9f457b ("pinctrl: renesas: rzg2l: Configure the interrupt type on resume") Reported-by: Diederik de Haas Closes: https://lore.kernel.org/all/131999629.KQPSlr0Zke@bagend Signed-off-by: Claudiu Beznea --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index 20425afc6b33..78f947a8e26e 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -2069,11 +2069,11 @@ static void rzg2l_gpio_irq_restore(struct rzg2l_pinctrl *pctrl) * This has to be atomically executed to protect against a concurrent * interrupt. */ - raw_spin_lock_irqsave(&pctrl->lock.rlock, flags); + spin_lock_irqsave(&pctrl->lock, flags); ret = rzg2l_gpio_irq_set_type(data, irqd_get_trigger_type(data)); if (!ret && !irqd_irq_disabled(data)) rzg2l_gpio_irq_enable(data); - raw_spin_unlock_irqrestore(&pctrl->lock.rlock, flags); + spin_unlock_irqrestore(&pctrl->lock, flags); if (ret) dev_crit(pctrl->dev, "Failed to set IRQ type for virq=%u\n", virq); -- 2.39.2