Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1054890lqo; Fri, 17 May 2024 09:18:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVufbs0H3ko7nNPHD6l8wUOJO60MK6DCa6YjoZ4YcmtBhN8gxNpmr2chJNB3vloHooWXnib4+ncfYfxMZzvYEuxHEmYHUQlpxqRiA0m1g== X-Google-Smtp-Source: AGHT+IG3HmXl2JhfW+we9AFHAPgI+icq3/pqw3blBA7xmu8JsWZmyj1BNuRnpEhhZ6vAb510trMg X-Received: by 2002:a17:907:36f:b0:a59:ba18:2fb9 with SMTP id a640c23a62f3a-a5a2d534e9cmr1356179366b.12.1715962690646; Fri, 17 May 2024 09:18:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715962690; cv=pass; d=google.com; s=arc-20160816; b=l7qLBZ16h5PBHclpveKEqk/uEn+SxmwKTz7/mJYbuzUR9/eJk4Li1ayJIVAuauYqBU 14Xba3vSPnskY+LDh8pMSEQNa2hPVH2xXDmI+3k3CPzUpa7d3DK0838FDM0TFAUNK3oU CB/V9GbisfDL6sYU1i+BOkIma6FKdOn6tj+WuEAarcms+4w5gtu8mmj05zNY+geNz2kG fgaQt2W83DCn1xvcxVbNEfLAF0N3NhEnPRcO0qgAc6sdP85C2wG5a0ify0oHZxH422fv FZ3ZlQ5RQpMaP9s9D+Oe7ZBy5KwlJOZv5BOwaD8LDgH+WJPYrDRyMtLfvcDyygNVFzep B/Dw== 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:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=Xwh3lnhUhd7oHBvNUUgJZI2n83eK0ml7NC11m5y4KDs=; fh=irX++Dt9PIJP79rbzcV/0LXjYRqbu6ulEv5WZoNAYN0=; b=ZNP9dQ4M8wZNQWMZJX9zlvA2amTCyN3Hn9syTjf/8w1tMqfeJcYiAbgog7Rp4/msX4 rL6ELwyUEIAeFNyNWsdHxWBdM+pI9+4gOK0f6WRU2sZ1XKNc2T4AX3KlqVbgLhwjaOBU UmNNY7bSSymXfRtheLJn8wvFPowyVJJHX9BHu85vYJKxM++u9qUL2BlvI2wKrlSdsYeh fI6iwEFbr9qDfNKCWEuyEA3/zfmwOwjASf6jbT/1ezXzFI6JuWWz7BWIvWTZWtKm0kJs QfxoVUsDDs/mJIfa3Pin2g2Wr3oXwWb2Q76BSWtVl0K9LQQ6fNmUGy7dqNy9/LzUY+Gc Qdjw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nexus-software-ie.20230601.gappssmtp.com header.s=20230601 header.b=fCQKzEXp; arc=pass (i=1 dkim=pass dkdomain=nexus-software-ie.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-181898-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181898-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17b21e3esi1030783166b.316.2024.05.17.09.18.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 09:18:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-181898-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@nexus-software-ie.20230601.gappssmtp.com header.s=20230601 header.b=fCQKzEXp; arc=pass (i=1 dkim=pass dkdomain=nexus-software-ie.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-181898-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181898-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 0A6151F2205F for ; Fri, 17 May 2024 09:09:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8F2A72BB08; Fri, 17 May 2024 09:08:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nexus-software-ie.20230601.gappssmtp.com header.i=@nexus-software-ie.20230601.gappssmtp.com header.b="fCQKzEXp" Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (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 7FC0A23758 for ; Fri, 17 May 2024 09:08:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715936926; cv=none; b=j5qcRiWaJaNz2BJSc0hr64una3FWhMm3UpKZCnPrLRLhTe38QpsvHx+sCpwQIfgRO8K5Fxh/b9B41vn914CYl+UW9Ogr3L0bqX7aCfXHpkoBK7+okQ3Em/w4IbKc2dYPw6qws9OQgVqWEthf9/xw5Xq0hvwR9bs/oeG7sDR5sYo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715936926; c=relaxed/simple; bh=TEHtCpgbdlqVzF1zXyzG1Szb517FKtFzCdajAHVAtmg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=sJu+yIduO4L70oIXYJ092GCyiepq2wmRJIw6qwDQ6TOTGgJsbh2IqLWyjM/ClHosKfp0ipTxCAfjyvGoq/TAsBsis49tpdulRBrEEolxzrs7TMwkr/1Tlh5FVHhuqM/+xqxW8rbbUr3aamW7vZ+4D+Ff4Mh3Yv1SuzD00joR4c4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nexus-software.ie; spf=none smtp.mailfrom=nexus-software.ie; dkim=pass (2048-bit key) header.d=nexus-software-ie.20230601.gappssmtp.com header.i=@nexus-software-ie.20230601.gappssmtp.com header.b=fCQKzEXp; arc=none smtp.client-ip=209.85.218.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nexus-software.ie Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=nexus-software.ie Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-a59b097b202so335334566b.0 for ; Fri, 17 May 2024 02:08:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nexus-software-ie.20230601.gappssmtp.com; s=20230601; t=1715936922; x=1716541722; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Xwh3lnhUhd7oHBvNUUgJZI2n83eK0ml7NC11m5y4KDs=; b=fCQKzEXpavPM+TuuR2ydaqtoyHospQaCnY360d1397CsR/nVbCTa1Qy0Q6YgjGqt/L tkD71mYnNkf4JPg+za0s+krI91AaiQcmsYTm4eo+hR1+6FJ+qk/r5PdHGmxxoOu+1SCX F9V6iL22RWAp6X/30O+cd43S0eAmvVGbO5AUngW1ROKKRaBdzP0CjmFdyCyKzmBiHMny XTxVCY32sQO2rL7jTXyskzCSalfN9RyM42mpoT51TCTfzB3+een6ul3CRmKuVeFabpZG jAaJH9a6IS9HafT9TBmAZe1RcPATh6djiTWWBCIZnVzt7R7M4BGByqqfEZGdWKs9ZCyh SsOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715936922; x=1716541722; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Xwh3lnhUhd7oHBvNUUgJZI2n83eK0ml7NC11m5y4KDs=; b=LhAasu5b7bl2BTQdig056b6WqeaGIj6+Ge4BUwIgAKCE40A26iajVgZBhcOZHhehJO dLW/msn0QJw9KRStXy5xD2I+i986tKI/Ef4gVoCW8IXNXaEBGHb8fITy5c66jv5oCvp4 AFO5ooAaM541aaQ9/PNkos7N4WoEg+nFU3f+ju5kgzMTRXmG3zBgoseFnIxvZV3ufour 6u6PGIW3FnJsw9ihUIGZCyR7Cux0Mx1TVXVH9XwCfth7QEpnFKu1hFEE3a8SkE+9BYIu fI8jTqDg58xHodaV/KhqQgND4pGUuSd3FA4BPybsojapLSluGLwdsxbFHBDU/PEylisQ 3QeQ== X-Forwarded-Encrypted: i=1; AJvYcCVtOH3k7qJQr4AfHsMhIR7pq3KBUDzhubMgrVv/u8tjSfSSpzvjPzSvUrJZ7hLhINR1fHate0vDSd2KLoPutHzp7OdITCRdKBFGzGv3 X-Gm-Message-State: AOJu0YwQH2v2ATU39FIvyNsYpIDUpum+du75l/xy1BTHHC7dqe3fj16Q 5/mhL/Ie4c8KrSHmwyEa8bVAarbPaWpzBVHm/oDhpY3E4C32XZiVJSWqDwyAuIM= X-Received: by 2002:a17:906:4886:b0:a59:a83b:d435 with SMTP id a640c23a62f3a-a5a2d55aa50mr1373772366b.18.1715936921554; Fri, 17 May 2024 02:08:41 -0700 (PDT) Received: from [10.91.1.133] ([149.14.240.163]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a5a17b17886sm1097162266b.210.2024.05.17.02.08.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 17 May 2024 02:08:40 -0700 (PDT) Message-ID: <40730e9f-ae2b-4b56-89bd-f839876271fe@nexus-software.ie> Date: Fri, 17 May 2024 11:08:38 +0200 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 Content-Language: en-US To: Chris Lew , 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: 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 References: <20240516-hwspinlock-bust-v1-0-47a90a859238@quicinc.com> <20240516-hwspinlock-bust-v1-6-47a90a859238@quicinc.com> From: Bryan O'Donoghue In-Reply-To: <20240516-hwspinlock-bust-v1-6-47a90a859238@quicinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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. --- bod