Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1092244lqo; Fri, 17 May 2024 10:20:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUE3r4GnZcki5TBFrU2WG8VAOsLThuggJMeBhwAbsQWnFUGCLyUEANuMZQJwl8chuwyjkwau6d7X+OpDisOezktrsHMrFFqOIiHIN+afw== X-Google-Smtp-Source: AGHT+IFDIGnVit5SWGA4fjZiSzgotD4uVfeie9aiTMwFYa969i0YiwC7Ly80fjmZ0rU/R7Hl2zGj X-Received: by 2002:a05:620a:46a0:b0:792:a8d2:83d0 with SMTP id af79cd13be357-792c75af2a4mr2747186985a.39.1715966451041; Fri, 17 May 2024 10:20:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715966451; cv=pass; d=google.com; s=arc-20160816; b=TolxMc0X1KCYMH26GAbvQG7tPiLQB3QZMvvlRwsoUHbUEibJf2V2xkIyIXMNyCTi+/ mZwA0n5uASyj9R4LVkpeQ8fULYOWGG/ucJ5/dy67nTlQATksZ4VNKVdzo6wdEC4NhS7b XyRXndCPIdpfqBTYqCQoC5lYxFxDGLHgA9JscHlXEJAmMiBssIcsculvcXU3ff75mlXR heU7b6p2fAyAUt1c7Xys1PQiFC/d/xWkQn9ivQ4SmgVY7Nj8pisb+qXktLq5DKI3nT6v E4mkBkMmOJsi5D3t/TTFHEjkYYndhAihu7tcU6b+3x417z2+HjP3pR8HKE7CMj360gt9 ABtw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=QEQp5msevNm4J4LDm9KOVT44ZsbOilXU6qGhunnZvBw=; fh=Lbxb+kQV05CxhSM83CxH/Og4RhC54QW2Jf5K2Q7zSWQ=; b=Xpyo10Acg6w/i53HqtAAXrUbHLD73o8F81rMe85FPWcpiGXSFNiMHOguS58LceGLz2 c/F69+Em9b3uaEvglIybc/0toWPrjDHAX+HvDy3I6dx1UUd+9SiEB4WkwAEyqlxMYmqr 2VwwXB07qjofRkm8bfqaSAH2JXsTyvZMjyookyRTvkhmjv2dx/AC1WCTpXW8yNKRx98h qypOxVhGl8T4o1oby9rwQLzGwzxVHjTIFZ4eyEMbnL9S8WbC0SPhwuy5CEr8ED+PZV3F n1AAAZM2jbotTHjZgyn3SO/SAYgu4n41eyb0Gxy9JNRCcVDduy4f794kCu0iBY2NjoG0 Iymg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=SXv+eT33; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-182396-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182396-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-793021afd53si474758285a.278.2024.05.17.10.20.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 10:20:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-182396-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=SXv+eT33; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-182396-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182396-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id B6AEB1C20E47 for ; Fri, 17 May 2024 17:20:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8E9B213DDAA; Fri, 17 May 2024 17:20:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="SXv+eT33" Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 22FF713DB83; Fri, 17 May 2024 17:20:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715966440; cv=none; b=pvw6P7HXUE640TJxBDS9pifhddFS/n4sqkaaYdS1PfCb56gxF3GUbN7jTEe2/8HdLDUpZkcshy/S8luQcaBy9C54lXemgpBWKYQFfk+HlLh7sszmV2O6UEvIK/aPJJ+OR8pJ8kycsrskDpaJOK7r++EFZAOYt1yb5QCxF9emzq0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715966440; c=relaxed/simple; bh=bGx5fE8ig9g3KHDsz9s7MhC3JHjF6v+ZqWiEcDWnt5k=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=h0NhKE7OdofOwVC1HSq8KZsmSPQcunhyQ1Z4rluwwiJvOUDm7h/dMWTZjDKxzT9NRtf/MXfXOLhL4gcoNRGmKPAxJ7Z/0ei5/7iwDmN80tiFCQ5svH/BiezgSTywnOno0Jlb9p++WLxUIilO4Q7FSdjIvyTan+H+boAv6QtRFKs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=SXv+eT33; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 44H98KK7007278; Fri, 17 May 2024 17:20:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=QEQp5msevNm4J4LDm9KOVT44ZsbOilXU6qGhunnZvBw=; b=SX v+eT33slzj66rpBelip6MvHlnUed3GkAQ4pD0Zi5tc3Tx8iL/MEa7eBwUHs/8SUY IHLugdQ1FWZi8MOd8d5dqpBBXuXHX1niQ+ki1Nd9+X4SehbxC8IgpIXQzQSFVMb5 RnW2DZ18Qr/3+PvhvZ5hJ/UIeiH5+qVMu5uKLxhh/kxYPwEEnZnqh+McwInskgfc rZ/ElEC0CVWEutgl6jIBMXDqZgWPABeli3Zi3SKUFHbLMcLM0P66IpoltPJ1sxzL nfKR4E6QjBZ9X/hikxXtYOM5/H/nfanjl+TeELqsExTpkwQqQToGBNUs0QIqQFU4 dxr05YbfILxoN483upBw== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3y49ge0m58-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 17 May 2024 17:20:16 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 44HHKFuP008062 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 17 May 2024 17:20:15 GMT Received: from [10.110.27.85] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Fri, 17 May 2024 10:20:13 -0700 Message-ID: Date: Fri, 17 May 2024 10:20:11 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 6/7] remoteproc: qcom_q6v5_pas: Add hwspinlock bust on stop To: Bryan O'Donoghue , Bjorn Andersson , 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 CC: , , , , , Richard Maina References: <20240516-hwspinlock-bust-v1-0-47a90a859238@quicinc.com> <20240516-hwspinlock-bust-v1-6-47a90a859238@quicinc.com> <40730e9f-ae2b-4b56-89bd-f839876271fe@nexus-software.ie> Content-Language: en-US From: Chris Lew In-Reply-To: <40730e9f-ae2b-4b56-89bd-f839876271fe@nexus-software.ie> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: YKCFMaI2rJ-_gTZA9j16KUiazNOWtQPz X-Proofpoint-ORIG-GUID: YKCFMaI2rJ-_gTZA9j16KUiazNOWtQPz X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-17_07,2024-05-17_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 impostorscore=0 clxscore=1011 priorityscore=1501 phishscore=0 spamscore=0 mlxscore=0 lowpriorityscore=0 suspectscore=0 bulkscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405010000 definitions=main-2405170134 On 5/17/2024 2:08 AM, Bryan O'Donoghue wrote: > On 17/05/2024 00:58, 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 >> hwspin_lock_bust() during remoteproc shutdown. >> >> For qcom_q6v5_pas remoteprocs, each remoteproc has an assigned id that >> is used to take the hwspinlock. Remoteproc should use this id 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 >> --- > >> +    if (adsp->hwlock) { >> +        ret = hwspin_lock_bust(adsp->hwlock, adsp->hwlock_id); >> +        if (ret) >> +            dev_info(adsp->dev, "failed to bust hwspinlock\n"); > > qcom_hwspinlock_bust() already prints an error on failure, you're > printing a second error here. > > Choose at most one. > Ack, will remove the error print here and leave the one in qcom_hwspinlock_bust() > --- > bod