Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp360572lqb; Tue, 28 May 2024 19:11:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUSLEPQ16iVmetXfRDx84ytp0ym9pIm50ywytlGBmeq8L+OTlGGAwgDzk39qIH2Y1nrQpcH2MkEShndqJVmut2wMeJL2NffBbYXrXNvLA== X-Google-Smtp-Source: AGHT+IGG568WPO1jU15r/I0EfwwVZyRc5WgbNS3oTMo8pU7t8USqrIMW7SL8sjj4x/RtX4P7ajH1 X-Received: by 2002:a05:6a20:72ac:b0:1af:ccd8:c11c with SMTP id adf61e73a8af0-1b212db640emr15794766637.29.1716948700165; Tue, 28 May 2024 19:11:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716948700; cv=pass; d=google.com; s=arc-20160816; b=jn/LYi9/fbAc7iqJWmNASp8YcT/XHN7YHKsNvk0qTd2zNriwfFLNI2Tc25+Gu4avj9 iQqIUb7PPnHuAt0m+rEkmlwsWN3iG2aWvDSN4uKZ491PuQdqMpxBKhVJ0FESsU4Oh9Yd FI+7+aEz+dgHOOlFQI0rBhx+YvnkcE1SAtR0S7uiL3NZg3ytnI17y9C+HKqp9EM3IosZ GsTjAGxMyhnh08xV0y7M0mkMVzRccetCvyDkQuuewVkOtfbBpuqP5o0gZ3kPc94iNsYJ v7Pp5nVQpfO98ufa0rc77CQjYt9YmuZo9FQVaHisiwVZLHdeC8zMpd+p+zdofaMhP96/ CvvQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=GxBlCYjS2T6LWtfzR/bReXgljwOB78Nfk5SKfbiZmJc=; fh=hhBqTtuIqve4ZdDRjBHU1O72CWcIMyjr6vDafInQ9as=; b=mWDud41Rrsas+Qrejq48d8XnJAFg2rx1wE7G9pF0vg0Q4l7cDKbwnAyVFKoVdY/3U0 F503pzY3ifcqmnx82v+s6Jv4GqkWdRs6i7QZ4zZcuRRka4RHNnA/9ZJCWAbH4NaLUVKO BKHx2AMWTqT9EJb1G1T6WO6FNuJpvNEWbnJ1GK0DSBVABP5FBBiICeKXLDPCNpvtzOC8 52+Jf/meBfSbPBcdBCLbMdwyGvlaU7n74JHkcdlm8A7vl4PcjL8rgmOF2gQ8G7Kf0bNO 0Khk9mzFFZuQ/n65kAK2AWTi5Ao932J/fcfsyg3FoMIBVsKCenbkJwulhdhzfsH3AziI h9Xw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=spPMwPRg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-193345-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193345-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d9443c01a7336-1f44c9a3d7bsi90540355ad.370.2024.05.28.19.11.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 19:11:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-193345-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=spPMwPRg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-193345-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193345-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 18E5E28B554 for ; Wed, 29 May 2024 02:07:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 921D415B989; Wed, 29 May 2024 02:05:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="spPMwPRg" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A761915AAD7; Wed, 29 May 2024 02:05:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716948352; cv=none; b=Z5/i/BqDQd6BOHygaZesjmnNBWg74cU6PEeSCOIk8qTPZlGAkfV+lQdOITikPxWeOAzLDV0sxzqCEJU4pMSPAg7CI/IOyvjn0Vs157jsgLq9/XqZSQt0i47kpt36S+1DdT8zGyJb1JiA7zzaFVzrUlZNxpAzTFIoxPnVbSvLj1M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716948352; c=relaxed/simple; bh=tshLIKDQX0zUEL0G4rPCVqyXNQad4aHwxWiAd2HUP/I=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dSLbvgd5s/Esa5NXJ+y33+0ZHUuKmS1qSMdCJ9bP1TrkgO35mNTWcYsjCxkUlplwpD/T+7v+f+oMA9w3XiqGR5PvZxcnaqRgxsapVaRPF6Sjn+clIEW43WxCCq1FwB6CMIfestBVKJfeqXWc7VNs0xSNeBSO9trcj4hHQWClFDw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=spPMwPRg; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C86D7C32782; Wed, 29 May 2024 02:05:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716948352; bh=tshLIKDQX0zUEL0G4rPCVqyXNQad4aHwxWiAd2HUP/I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=spPMwPRggwpE80SBC05KT7CcQelIEaFg5HbhWG2WRO9btBrx95aHWZ3kiGrKXxwSz kC7qRLQbFwrJMTd0Z0ehYgHCwtZuK0mlP7tptB2GrOPonbwQuuu1snNUb8htzfRxZp URTKwCGLH0AoDnxjjPLv9CexJKCU4GqbigUgoAbOpZZEVeG3IzSHht9qPZMPndVUec AtwbeGSh4DWOpIMzei8fJy3+fYQlkngbP7Mwd78OTu/IgYdUpD1ZQ42G1PNQTNt6A1 d1Qlg+OP8KFRgi+z09gwbBb7ZT1h9RwN2RzC/tFvOoAQzbCGFvm4gFVjPzNUzuh6oH /y2lXFcJTkIjA== Date: Tue, 28 May 2024 19:10:34 -0700 From: Bjorn Andersson To: Chris Lew Cc: Baolin Wang , Peter Zijlstra , Ingo Molnar , Will Deacon , Waiman Long , Boqun Feng , Jonathan Corbet , Mathieu Poirier , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Manivannan Sadhasivam , Konrad Dybcio , linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Richard Maina Subject: Re: [PATCH v2 4/4] remoteproc: qcom_q6v5_pas: Add hwspinlock bust on stop Message-ID: References: <20240524-hwspinlock-bust-v2-0-fb88fd17ca0b@quicinc.com> <20240524-hwspinlock-bust-v2-4-fb88fd17ca0b@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240524-hwspinlock-bust-v2-4-fb88fd17ca0b@quicinc.com> On Fri, May 24, 2024 at 06:26:43PM -0700, Chris Lew wrote: > From: Richard Maina > > When remoteproc goes down unexpectedly this results in a state where any > acquired hwspinlocks will remain locked possibly resulting in deadlock. > In order to ensure all locks are freed we include a call to > qcom_smem_bust_hwspin_lock_by_host() during remoteproc shutdown. > > For qcom_q6v5_pas remoteprocs, each remoteproc has an assigned smem > host_id. Remoteproc can pass this id to smem to try and bust the lock on > remoteproc stop. > > This edge case only occurs with q6v5_pas watchdog crashes. The error > fatal case has handling to clear the hwspinlock before the error fatal > interrupt is triggered. > > Signed-off-by: Richard Maina > Signed-off-by: Chris Lew Reviewed-by: Bjorn Andersson Regards, Bjorn