Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp3152020lqo; Tue, 21 May 2024 08:14:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXp/1jDaIqpn/8B23+gD0QXM2cmA/zKbfg2SQzcFp1bsylbPtypQ1IEYx8AqOUH30mtqAPh/2eUINH8V4/VJukgg3qgEzQvOWUZM1yRWg== X-Google-Smtp-Source: AGHT+IGwYRgpkITjU387msQ7i53qVTk2RF1RjlO1jc5MdrkzjgnR5Tk8kisy78iGQ1hR+MUttLCY X-Received: by 2002:a17:90b:1a89:b0:2b4:329e:eabd with SMTP id 98e67ed59e1d1-2bd6035a8bemr12354780a91.2.1716304486236; Tue, 21 May 2024 08:14:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716304486; cv=pass; d=google.com; s=arc-20160816; b=oN0L6dHoBOEhGXkGMP2EQXgPCIZrttH2fZT9EODl5ZCiYT/K10+UabIpuGHJ2cA7h1 c0ZxoP/MyO6CvcIika2aQ3fbl/wT+4JPL1bPksOFTCGd1Z6ef+tkWc2Vqd5gZCxTuGZv lbdrAkCLz5e628dnUVvCh6SMh6nPCN9A8rUWAaNNXR/CpuRs/Of+Ce7MCD8Z2Uj6HZ2l G3e6RI1lqsoKQUbyKOEgdd37SijrHXVJ+y/PSJaI+4sH/qF1zl+d9lT02lZHH01X11Yh AQ/Lg1MkKQOoe6PXP4Uaa6jADiZKhhXnsuKnNycQx8MfeUWqBVOAYaj9A6ncAoQCQ6yh l4pA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:organization:message-id:date:subject:cc:to :from:dkim-signature; bh=7huwlz6e+OJTDpkqE9pk3NgcFlZcNZLJZwH9Yh0gUb0=; fh=AOGhznykn50OXmbeoMAbfE92NHJdywg+7eK8pjHBjbs=; b=vIHmu+m4myyG6utav8ACuIZqkI81wJZRoE/OEe+kAk960csOVV1PK4vI7Dcxj5DDXx +QQV1gl4LHijIFCM9gtc4o7Cb+lc3pWqZH/mlsx/n6q7DAVMPD937CksXGmMz9lz1GMW jRU8N0052ycdInQmKB+an3V+qQPnaxcPAjRXhvr+kWlRIk09/PKwul18zsZweZWoHYeq K8BVAjnqc+o6uC7FGuKkFBVc1iJTz5buyoPf0G8EmTS0nkp/vKpQDbyxlNURQ8xNgAGn l3O8RkUTz8EJr/+hVLmSE9sMx9bU8BjI5H+xtHIqTJnqPMLU97Wjx1CcccxOsHLswVSB zl1w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@cknow.org header.s=key1 header.b=xH3OScQO; arc=pass (i=1 spf=pass spfdomain=cknow.org dkim=pass dkdomain=cknow.org dmarc=pass fromdomain=cknow.org); spf=pass (google.com: domain of linux-kernel+bounces-185134-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185134-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cknow.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b67177e903si10668630a91.189.2024.05.21.08.14.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 08:14:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-185134-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@cknow.org header.s=key1 header.b=xH3OScQO; arc=pass (i=1 spf=pass spfdomain=cknow.org dkim=pass dkdomain=cknow.org dmarc=pass fromdomain=cknow.org); spf=pass (google.com: domain of linux-kernel+bounces-185134-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185134-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cknow.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 17AFAB23C7C for ; Tue, 21 May 2024 15:08:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EBBF61442FB; Tue, 21 May 2024 15:08:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cknow.org header.i=@cknow.org header.b="xH3OScQO" Received: from out-185.mta0.migadu.com (out-185.mta0.migadu.com [91.218.175.185]) (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 0CD79143890; Tue, 21 May 2024 15:08:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.185 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716304102; cv=none; b=Xa2490nhT6GVYkARz0DF6eyc//4/3Vzcuwbfe3BmsD3Ekb6ba+D7XxD0qZ79eGk9J9dVr3yOAeAeQAsCt9+KWsMnRIv4sUA2qhaRZrEZ20QMw/fD1YiUYeA5QX6B5PDENLRnOiN6zIHxSYTL4Di5qZWJzjqlNWm9zxPoG23kbMQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716304102; c=relaxed/simple; bh=XbwB6Y1ncfxvFcAluUNDlB2Uk3g7I/vYkgRiL0JeCwE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=k99rVDKDI1g0E6j+whbxgdHauLUg6SGr9+eKZahVoF2ofHsr9X1ddLnJhjlyMDxkHIVKRLR31u0XgNhvgiIZ6YBz3mxLI8vpIVOsIMrmHLmIdbPYPlpoRWpvvkwzMjFOA2N5AVeLCvkMK+EsAIU3dS5iUR64e0dveJMUwknqA20= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=cknow.org; spf=pass smtp.mailfrom=cknow.org; dkim=pass (2048-bit key) header.d=cknow.org header.i=@cknow.org header.b=xH3OScQO; arc=none smtp.client-ip=91.218.175.185 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=cknow.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cknow.org X-Envelope-To: geert+renesas@glider.be DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cknow.org; s=key1; t=1716304095; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=7huwlz6e+OJTDpkqE9pk3NgcFlZcNZLJZwH9Yh0gUb0=; b=xH3OScQOnERJ0m65qBvqlVgCWgjvFXfSPRX1tZVYhS73pVeKCe043+2s8cYuhBQIA7AVXM 2LKEXv8lS07ur8cWPXYtgXNjqyaur6UFfvPjPKKWwbAQ2lFORVO2oKe1/DKRnF89Ny7C2g DLoFNBCOI7PbEko0S1Be85GtbqruXPfFLaBQD3IIyBBmHjw3UcLRlv6QxuB6xqbOUDWBam bZg0NakLT9kpXwbJis/GG9hoeewT9LW5FHXnPthD98tDo3FNbY5P4cidd8qLoFX+8uuzIf Gf2L2auEfCSxijy2eXPKmXTp/UeHYzEMtTryLrqmHSBcaRES5m6URWYoe+j9Ag== X-Envelope-To: linus.walleij@linaro.org X-Envelope-To: efault@gmx.de X-Envelope-To: claudiu.beznea@tuxon.dev X-Envelope-To: linux-renesas-soc@vger.kernel.org X-Envelope-To: linux-gpio@vger.kernel.org X-Envelope-To: linux-kernel@vger.kernel.org X-Envelope-To: claudiu.beznea@tuxon.dev X-Envelope-To: linux-rt-users@vger.kernel.org X-Envelope-To: claudiu.beznea.uj@bp.renesas.com X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Diederik de Haas To: geert+renesas@glider.be, linus.walleij@linaro.org, efault@gmx.de, Claudiu 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: Re: [PATCH] pinctrl: renesas: rzg2l: use spin_{lock,unlock}_irq{save,restore} Date: Tue, 21 May 2024 17:08:04 +0200 Message-ID: <1909974.d4bNfQZPDi@bagend> Organization: Connecting Knowledge In-Reply-To: <20240520072033.228049-1-claudiu.beznea.uj@bp.renesas.com> References: <20240520072033.228049-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart5820949.HBZXY12uQI"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-Migadu-Flow: FLOW_OUT --nextPart5820949.HBZXY12uQI Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii"; protected-headers="v1" From: Diederik de Haas Date: Tue, 21 May 2024 17:08:04 +0200 Message-ID: <1909974.d4bNfQZPDi@bagend> Organization: Connecting Knowledge References: <20240520072033.228049-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 On Monday, 20 May 2024 09:20:33 CEST Claudiu wrote: > 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); Now the build succeeds on both amd64 and arm64. Thanks! --nextPart5820949.HBZXY12uQI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQT1sUPBYsyGmi4usy/XblvOeH7bbgUCZky41AAKCRDXblvOeH7b bv6EAP0YuCZoGdztw1jivJ1yX2r7Z1UJqSpTOJGtwl10KZCmmAD8D6BkuzDB3RCH yIhCrbJaTvdW+PJeKOqh6hG2Mb85nw0= =x0p+ -----END PGP SIGNATURE----- --nextPart5820949.HBZXY12uQI--