Message ID | 20240320104230.446400-2-claudiu.beznea.uj@bp.renesas.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-gpio+bounces-4482-incoming=patchwork.ozlabs.org@vger.kernel.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=tuxon.dev header.i=@tuxon.dev header.a=rsa-sha256 header.s=google header.b=STa7OF1W; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:4601:e00::3; helo=am.mirrors.kernel.org; envelope-from=linux-gpio+bounces-4482-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [IPv6:2604:1380:4601:e00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V04vL1d8Zz1yWy for <incoming@patchwork.ozlabs.org>; Wed, 20 Mar 2024 21:43:42 +1100 (AEDT) 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 43EAF1F23C70 for <incoming@patchwork.ozlabs.org>; Wed, 20 Mar 2024 10:43:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1A06E39FD9; Wed, 20 Mar 2024 10:43:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="STa7OF1W" X-Original-To: linux-gpio@vger.kernel.org Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) (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 ED95438398 for <linux-gpio@vger.kernel.org>; Wed, 20 Mar 2024 10:43:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710931413; cv=none; b=k2im23VA8VSTrXMOHNaBAEBQJB7QPJ+gEdoA1+j+yuqnoJa2WMimOgLVPGJaCbp5OxqpIYh1JwLZdIhZ9VoEbWWJ6GJ8pKTviRoMl/Sk14MhE5eCGqjhuuXCjvn3mvLOXtpD6PujMbylh8Nbqnv0wi9h4moPtx7YR8nlsRslajU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710931413; c=relaxed/simple; bh=7ZaU0uCh1hevP8SFs04y10m82esCnet9aRhHtaN9oRc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ZDF1qta74YzY9j1DdqQqQVaGibWfT4/1QBTHWwHknPOQIqY9joWQUx23lu5HQArKJiwH3yTBwsb6AtcBpgqF5q3aMpwmfIkQkEKFYweUwKbxz6j5Hdgp6iYlxP+viHnzfYSnAo7V+rueBspqnLApfU0ZrxU2L7q46007nI5/dKw= 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=STa7OF1W; arc=none smtp.client-ip=209.85.218.53 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-ej1-f53.google.com with SMTP id a640c23a62f3a-a46a7208eedso553942166b.0 for <linux-gpio@vger.kernel.org>; Wed, 20 Mar 2024 03:43:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1710931410; x=1711536210; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FOF4vrt0/prIYxG3jaGyuQuStDIiGYYeXFVk6eKYh6c=; b=STa7OF1WiPPLvMsU884Q+/YMoEejxvipZZluAUXEljnl/FNxZe+/D22kaAuSzRWVwE fmYZPnYyI8EChhuqf5oBWWAfLr2ANA17aLqu/L3fDV/ZNPEMyGzGwrVkdQa7LoTS5kKM Cu2At4DmvS4nejNnf61RQU60TpCXNLYd3XvsdcfGvX/+iX9cJ4m/RKetD+oIQZ75+elA 2vlPXVyljR1f++AhD6vg+mOamM0WOs4QzfNjvraem4v+Nrjkg3Nk4VJhYySa4Bo2sL1t Fg2cLXGxGRvTIJX+C6ZPuQ6SjMCZBdXUXEUk4pg7xikx1Lfya+ud+4wkR2rU8LQYaMmi z+rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710931410; x=1711536210; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FOF4vrt0/prIYxG3jaGyuQuStDIiGYYeXFVk6eKYh6c=; b=PJcuwiOmF0wg80+uPkjSFNf7zltrNchHqehKOcM78MNq2pz7BIsBYzM0pNFEuiQDS6 AT07dE68axqEIYpvKpIL7j5jOc5VWzCfXEuSWZAiMkMI+VMPUQyRHb4caZYsqzkdfkgp NovIk+6ppUbXvlACqmwrA9Qmw0FxKUS06FEAv7v1jjLoggynM0VfUQvmMOvCd8QScGzo F4Y2YzN1fQSTfmWdj2fD+PHFpFz/+dL+qJXhF8vhPERymQO3ruk2vESxQn+7EeMOz+TL wNhQOtHWytSU+A51yZcNtCKuTHD6TZ9RHU8gBCC0OBje0HLynwI88+kKTt5d2a+PSrII f7ew== X-Forwarded-Encrypted: i=1; AJvYcCWPhI5Gw0vxOPbthXfbvqBww58OoowIUkG8yPDyPx0czwmWdtmJFMD9POYjcWXes2szNS7GfVI3ZUOmCt4her+69kk6GUznB2KnYw== X-Gm-Message-State: AOJu0YxGj/YCDKBxyc/oAsToVoreAHURHbxkJKQEzZP5QmpacjRpmofq IGFu4915cm4bjCy7AiuW/018/TI8XfP1fXf46pveexGbqQQJ8/QhiZIJ7aeIaXc= X-Google-Smtp-Source: AGHT+IHNA2arksT5JtyV2Y9LZgj04GJ8RSUiGG9tDMEg5rfwM9WxsKHeQgXvovHartHUSsEdtdMpSg== X-Received: by 2002:a17:906:c042:b0:a46:cf3e:c68f with SMTP id bm2-20020a170906c04200b00a46cf3ec68fmr4208432ejb.49.1710931410110; Wed, 20 Mar 2024 03:43:30 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.144]) by smtp.gmail.com with ESMTPSA id o20-20020a170906289400b00a45ffe583acsm7092081ejd.187.2024.03.20.03.43.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 03:43:29 -0700 (PDT) From: Claudiu <claudiu.beznea@tuxon.dev> X-Google-Original-From: Claudiu <claudiu.beznea.uj@bp.renesas.com> To: geert+renesas@glider.be, linus.walleij@linaro.org, tglx@linutronix.de, biju.das.jz@bp.renesas.com Cc: linux-renesas-soc@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Subject: [PATCH v3 1/2] pinctrl: renesas: rzg2l: Execute atomically the interrupt configuration Date: Wed, 20 Mar 2024 12:42:29 +0200 Message-Id: <20240320104230.446400-2-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240320104230.446400-1-claudiu.beznea.uj@bp.renesas.com> References: <20240320104230.446400-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: <linux-gpio.vger.kernel.org> List-Subscribe: <mailto:linux-gpio+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-gpio+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit |
Series |
pinctrl: renesas: rzg2l: fixes for pinctrl driver
|
expand
|
diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index eb5a8c654260..93916553bcc7 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -2063,8 +2063,17 @@ static void rzg2l_gpio_irq_restore(struct rzg2l_pinctrl *pctrl) continue; } - if (!irqd_irq_disabled(data)) + if (!irqd_irq_disabled(data)) { + unsigned long flags; + + /* + * This has to be atomically executed to protect against a concurrent + * interrupt. + */ + raw_spin_lock_irqsave(&pctrl->lock.rlock, flags); rzg2l_gpio_irq_enable(data); + raw_spin_unlock_irqrestore(&pctrl->lock.rlock, flags); + } } }