From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 D05543E0749 for ; Thu, 23 Jul 2026 10:16:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784801783; cv=none; b=UH08YtIOwAIpT+NcY+BjazOqEg0fRzQwa7NsTrtxZKhCzHBp9ldhH3O703594F9zFdEe9XZVLPALCLjiYp2DrdhcM00tvfGJpcLlx+f10Qj8TDZSaf7nqH876H38K4TGjGUghOZO+YTvQBilmSLiCFuv64pcY0j8KHtahezURLs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784801783; c=relaxed/simple; bh=OOzxk0j7yI39H5AAbUVVegB2Hx5jR8U3vPwKCA3cJcc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=NEROpIpm2xsXH7lDVvyjuGGaa5SNUNVTFA4abw0dRcYEvA2IhrP4vGDepef90H0YqFvv4K0AA9ls+B5SfrFlICyo4qbBTFPR9xlkEXaYKbAHadYAtf+NsklHCtRexQXyVMcWKK5/riSvYxS7zEYsYvjRlGiCIw677VK7AODDu0k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=DJB7vrJ2; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=CcvN3cny; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="DJB7vrJ2"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="CcvN3cny" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66N8qmYN3489648 for ; Thu, 23 Jul 2026 10:16:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= eTUkxGPu6yjD3DgvQUN6d2HdXWpUU9P4B6iCx4Rs/ik=; b=DJB7vrJ2H0i7jGyv XkeifS7mF0TvPEvMi10gub0RQ31XP6G8aMqELSt739/wT1zJY9rKRFiRNElWQkWg ekWpuvNyeh6+F38csSMFXFIW0RggFqUvw7QW219naytFbyAHjkm6yPNLUn7388E4 M6xAbBTKYtONGKPoCoNpfQFA6Eecu0jvxw6HJnp/kTh4AjG4vTyLboR+RWgyQ91M njfSbo3EpjO7P0f490nIYtKRYFI/NjfFohV5/BbZ4jLbxn0LqqoehhQTWKKvMUjw 8dHVMY0GMGqKu/jjW9AARfZxYggNhKgqkhJZqw7b8fJMyaNTHNezrt4AEUpKPuIl ZQNqew== Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fk28vkk4k-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 23 Jul 2026 10:16:20 +0000 (GMT) Received: by mail-qt1-f198.google.com with SMTP id d75a77b69052e-51e9d892f0dso2965381cf.2 for ; Thu, 23 Jul 2026 03:16:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1784801780; x=1785406580; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=eTUkxGPu6yjD3DgvQUN6d2HdXWpUU9P4B6iCx4Rs/ik=; b=CcvN3cny+s7J+yMnU9+iBeu8W8F0pv0X7j/1nperazhKHJDqc2mHKxRFbZ75cK+E28 Corh3NEchF8Uq3oPZPg9FyGlR41hI7xnWZvsHZg0plIplDXp3RPEUUAokESn71VTHweM Wldc9KtBUQK2I/S1KNJl903owkil1BRbWvovzeHJ7yGiqpeqbSxzQ4Mup1UHDyh28aCm eCncH5wvPd2dJbBF1y63AbdS9uWMC6l8AbuMt6NEZWJOOb/hA31KRD0ijX6SSpWJjsBl /I+wjVp6AG3tDdgiV8mU13L9Vp7uG59ZYfiwZsgP1YBnXnSHvfqdleZYE+gWeJ2nsuII V8bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784801780; x=1785406580; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=eTUkxGPu6yjD3DgvQUN6d2HdXWpUU9P4B6iCx4Rs/ik=; b=eYxWK9ItAtQ4rRIuhNuieB363JmHGbC2UBHXbCoKjPfRG8Rfbeg9ZfMi9zx+NWImfY xd7tBpvisvbfxOe84D9fwhdeUi8NRHg5yifq5MD6U+WAHj6wIYXBzz8vzGeMBjt2DKd6 zJPxg72I0ZNpHwAk5GWOoHg/fXsuaHIv65gDQeOpajekoW1841hqiSrD2VOMG4DKdraO C3DJkLHS4vTLet7kJlp7IOIDjBNxh9EUixoavsW8HwLIwR3AZBJj1cbD5vU59+iLBlkS d5AF38qkUVzlFtIfuOS1WV8fSz+n7a3fSBbgAg7i2x7b6pngwbdr9DmVKaDpE5gKG7SR 0Otw== X-Forwarded-Encrypted: i=1; AHgh+RpWODpiAI1OFGCgk+2pwNNuHpvJRipDD1kfnejIUN9thtGM+a0V7pscEL6F0qk4Z90dWujLHBYNjjznKaY=@vger.kernel.org X-Gm-Message-State: AOJu0YyVcY6+1O71puK19Khzz+SoIXWl0sSbQASOLO7lDlPsqQ+UmHdx SajMuXTV7L2CDjG+V6+yiUOUkqPUTLazFKj1nR73p0IVg6vM2ye1HmW/GFCNmX1sl+v/df9eG35 IceUrq+kNI0opz5fHHMvaL8vi62SDYcHn+0IjHkUDT9y/lrrWdcyjgnSaYLzONMG5o7Y= X-Gm-Gg: AR+sD12L8Tbz+eTlHmZ8PKpMDD2HJHxnePKBL5kiU3FjUs/BWDa0zfmoTIj7k9YBnxk XhPrZoAJzFl4T87gZPOrHxH7Q2dLNLtLCKyRY5wgm5844/xSByH1m+Egxouziuyl6U3+BZkQES4 cmZ3evUgTR6hkTQHaZQtJxwXgaKAJkCwZ6zmQupELziXHBZj7oyipgdPiLxPEQxuVE9/CPMHSdu kLa+9ldln2WtXXpmCjn3IB38CBOiZWZ0LXMX7Ue2d5nVlTyzr0WvgsWB1JkkeYrfsiTVn2H/Sfp 2oWgvO//7SK1FQ2H0gWacZseXIExx05W9jsv/CIr4vttX0qn5phXcMOaaGmbI8qVb/npcxOoW04 9FNeY06cAxa4Lv9iRaDlNnib+ X-Received: by 2002:ac8:6f06:0:b0:51c:4ffa:9b71 with SMTP id d75a77b69052e-5283dedb47emr16401591cf.6.1784801780105; Thu, 23 Jul 2026 03:16:20 -0700 (PDT) X-Received: by 2002:ac8:6f06:0:b0:51c:4ffa:9b71 with SMTP id d75a77b69052e-5283dedb47emr16401391cf.6.1784801779644; Thu, 23 Jul 2026 03:16:19 -0700 (PDT) Received: from [192.168.120.193] ([178.235.128.140]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-69f34b92a98sm1923256a12.10.2026.07.23.03.16.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 Jul 2026 03:16:18 -0700 (PDT) Message-ID: Date: Thu, 23 Jul 2026 12:16:17 +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] remoteproc: qcom: q6v5: Request shutdown if crash is triggered host-side To: Bjorn Andersson , Bjorn Andersson , Mathieu Poirier , Gokul krishna Krishnakumar Cc: linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260723-q6v5-host-side-crash-v1-1-23bd53db90a7@oss.qualcomm.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <20260723-q6v5-host-side-crash-v1-1-23bd53db90a7@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Info: AW1haW4tMjYwNzIzMDEwMCBTYWx0ZWRfX0kbHvwUNRTBs CB6HOfVvpU0w1UcyqZY6qhkMxPBKgMK+/2s3lXeo/w8bWEKiEVT4HP5xXpNl1pNeCBFhgrTWKQQ G7gw2gnMz7/H5PES0EGkSK9eQWHXBu0= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzIzMDEwMCBTYWx0ZWRfX2KsR9Euy3xBW /KKeSAqxmXPjIjjaNHHVQ1VZQFOe6yrkKzK9Z6Lf8YWlFmN8gY6sU95a4S/tBfQSqCnLVszWWI3 rIjWPfQDk8XyApyfYSonaEo8YzYZzjB3SuDQmJn3cXBQn59MArQGvuaiA1SMmfaYC/lakowthkQ GWElIVHco7Rt6JsgxLZYy3BPsZ9fxacb83xpcNxjn5tvjbcQnrgfSPIE+voR7kSpD9oeEcvG2pV qBHHY/ZGRm6UA3ReZHqFSN+9zFXXN7GtMp26A0NW0cBulCp+md+MDVSUbMrbesEmQhf8Mc9iDbG 94cBxSdjgqadmsN5ppIpOoouTFWvO3EZnvFsqrLQL2I12rR6q8crnlbVGS4PSRI3mFP4+2j8d1f UDvlCDhaGBW98X7rBhEo/62uNCWa2i6qySEinUJRoDHZ8cr2mO0lKnq1vFHGpscgCTP4oN91yB9 wWLI3czavBHNxPWpDEA== X-Proofpoint-ORIG-GUID: jTF68Ph_5XuRKEy3Aijxf9BdPXh5L1sC X-Proofpoint-GUID: jTF68Ph_5XuRKEy3Aijxf9BdPXh5L1sC X-Authority-Analysis: v=2.4 cv=D4V37PRj c=1 sm=1 tr=0 ts=6a61e9f4 cx=c_pps a=mPf7EqFMSY9/WdsSgAYMbA==:117 a=PRfkaYvzSr8QmIIGAkY2Sg==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=EUspDBNiAAAA:8 a=sz4EqRGSCKQxEAjEHVwA:9 a=QEXdDO2ut3YA:10 a=dawVfQjAaf238kedN5IG:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-23_03,2026-07-22_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 malwarescore=0 adultscore=0 priorityscore=1501 phishscore=0 spamscore=0 bulkscore=0 suspectscore=0 impostorscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607230100 On 7/23/26 5:00 AM, Bjorn Andersson wrote: > rpmsg client drivers are allowed to invoke rproc_report_crash() on their > grandparent when they determine that the otherwise seemingly healthy > remoteproc has entered a functionally broken state. > > In the crash handling path qcom_q6v5_request_stop() is invoked, which is > based on the current rproc state whether to request a graceful shutdown. > > But the current rproc `state` will be RPROC_CRASHED regardless of where > the crash handler was initiated from, and empirical data shows that > unless the firmware is taking part of the shutdown the system state is > often left such that it's not possible to start the subsystem again. > > Use the `running` state in the q6v5 driver to make the decision instead, > as this does represent the actual state of the firmware. > > This makes it possible to reliably trigger a restart from client > drivers. > > Fixes: 3cc889eb83f5 ("remoteproc: qcom: q6v5: Avoid setting smem bit in case of crash shutdown") > Signed-of Reviewed-by: Konrad Dybcio Konrad