From mboxrd@z Thu Jan 1 00:00:00 1970 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 09A543112BE for ; Wed, 24 Dec 2025 03:21:02 +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=1766546465; cv=none; b=cpYX1bbNqbDF934U9W0/jQERcnbrUKOG/olSQuAePLxJzT4OTI17z009kfYSsuD4VNlRhYQPceDF716m+VMUlkv18dRBD8DBq/6FxbA/0Y+5pgwRtmOEOZstyigwf4A0HUgtYNzsXx0arNwrLgfoqInVhUSMgKlBEhrUwb889s4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766546465; c=relaxed/simple; bh=T50vE2dUYm8Zie1nHtYyZrvmnFybSZOoezC3TSTzs28=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Y93uxTppJ2o3BUz/PRvDDuZBMuG+TfTviORyVwRQCp2xyq6Ck1166/X2CWOf99+rKpIWZ6eDcDKxTLiNN3xbOp4UkModJP7t+BhaY1TePCaG6FWnK6Z5BdxQCdxwy7K6TKPQ1w/FPYcszMntPHs5WPD2p9eC1uddVtXMFxxty+U= 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=Ymnzvl/G; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=VXaV+P5y; arc=none smtp.client-ip=205.220.168.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="Ymnzvl/G"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="VXaV+P5y" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5BNFUgKG4044111 for ; Wed, 24 Dec 2025 03:21:01 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= Ef2xbZYFBLvV8iHc1w+Z8FJ2huGyVK0CDpCPxQoM66Q=; b=Ymnzvl/GE98rvMHF 9M4c7i5jv0O9mzPwTJwvVy93CoB6epDZmX8N2h/EKVLfeNZFEl2lMj53DzLGAfKV KLIjPzq2whuYYND9qWIvjEnigsNyluy2Mx3FzZn7M4nWcPj3ayuugb9HWd1mU8MF 9GZg3cjqGsrE4qYUOCSGG0NPmLdasaZG/OY+jkJ3q0nQ8+yRkg6PuMEVzeTLH9V6 9Pc/V/sDWoZGuFlO1f0hw0Xm9FjYsw1F008nKh8fbO6mcI9m9ILfJOFQe0XTaRgN ZXJvst//6ygpyaGYsdw5F2vA+fi+/BINmdVQvg4N6LxPFYCuyw2+9oknqJDWeGvy 64cF+w== Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4b7cuhcvm2-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 24 Dec 2025 03:21:01 +0000 (GMT) Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-29f13989cd3so167881465ad.1 for ; Tue, 23 Dec 2025 19:21:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1766546461; x=1767151261; darn=vger.kernel.org; h=content-transfer-encoding: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; bh=Ef2xbZYFBLvV8iHc1w+Z8FJ2huGyVK0CDpCPxQoM66Q=; b=VXaV+P5yHXmdmsem7Fa8aV5KJDf5qvwKiv0yfRvAsazc4ZpdKc/KZPlwFGmsZiQi2p PO+SYp9MDoaoCgBNxi3uOm7ebM6+XA0WbGqQVrxJr2E9Ch4xWJ+uS8JEkgqdYMP6WKqb 0N4NeAwAkq9H6ncRSTXq5w8iDoZLVMKwODT8adpXJVD86ogRh8oAYpthe+h0zW87XjWM hYvCpwEJOMxeI+3zkd7Qheq/6+2g0vOuOVy2MT8oOLcRSPgFmzFgkbSEjWhxOuaDeBwo Nb1qxhclaww7it6FElMxukJ9tmCIMlJJppKDrTFbYs069wC7cF66Oy/zTNSKuj2XtHZc E9iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766546461; x=1767151261; h=content-transfer-encoding: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; bh=Ef2xbZYFBLvV8iHc1w+Z8FJ2huGyVK0CDpCPxQoM66Q=; b=KSD1jFsy9DTOqedbvgoVYemLkFZlf3560ix/DxupnIa1IfF/qObK44HotY7AuXd1gP FfkAPWCPBDMTS5ui+YQYgWGMFibrWcspECvP2rjL1SsQ1hRCS/6444EzG07++fIWsw/V L0GBClVWkmNww01Tieq6XKkgenl6LLc4WHimvmwA433H063x7L8LqGL10dz2R1fV5rZR 9cVQ0OZW9/cjtTZH4UoH+QIyqDWdzgjhSh9qE40Y4nJ2jzsDf1Gkt4XkjmpFUYFTBsea YyvwYmSB/Q2Bs+rCPJ5yzAnkYnrPo5cwi/iCXK78Lfv9jnDyqJ/uY1LQgJMGjYkJ191C igyA== X-Forwarded-Encrypted: i=1; AJvYcCXZclI1937UxxFRzjmOrOtT7Ty+F7tZgvSgGi4pngV+Y+2LcMGM68GsaElAGkCITK1kjwRkPp+n9LRiJeE=@vger.kernel.org X-Gm-Message-State: AOJu0YxIQOgNZX32bvfBf08SHAN5nrMLwyxi7L385xaeFYPyRPMpaW65 LzeWT2K27sAfmLMiXTUD8mAXb8O4EKDIxM8KZ9XljA6ip2bLRGgCQk+CwXPUfbbpSUDHlgmhZvy G223npHrEnjvflc2wIH3r2c6C/u58ZRp5ANodCdKkLBFgR7n4Ddef9h2B3K5zI9Kqlls= X-Gm-Gg: AY/fxX7Y5iyBGo3G92do6oFZrYJsBBF01VJySwoDaGhnzV/owsAlXq0hroxEjKwVqGR 72FeY5R5vqNNtLvZG5RLoQucw8PyroTABoSZgXUF55ymZyXr263iPCxDHJpX9tEv3/JO06QI1LJ xDnrdzOb8jF9MlvXU5mqvQuoQl4kVKNDD4qNYc4YzY98cLPAa79kplK0zNEU3c369KSEIg5NSrH wWpOLQA8iEcxywiGp/ZRbBPGQcXR8R8JT91IlaDEO2mfE+A7/yMKvYQFnz+6IjdXnSNSKuV3zRJ c3s17Azpa1W5eA/Syt2rScBlrn35xtSDalt5J+/t6RUjzF25maS5FN7UEunc85aes5suxJ8s+B+ 6S8IR0GMKNU/wnkfrjs6/A56cKk49WhMegXu9zqNzQFJ9UNA3QaJMMiElBHr+mIv/2xfFc8EhN6 ew0ARr X-Received: by 2002:a17:903:4b08:b0:2a0:d692:5681 with SMTP id d9443c01a7336-2a2f2424895mr139885085ad.24.1766546460888; Tue, 23 Dec 2025 19:21:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IEr7VP+KbQ00quvc7LFltxfmgOjKAAucSk+LjkUtqG/DLGixAnZdWekuOsy1KNQfere6mRwcw== X-Received: by 2002:a17:903:4b08:b0:2a0:d692:5681 with SMTP id d9443c01a7336-2a2f2424895mr139884815ad.24.1766546460362; Tue, 23 Dec 2025 19:21:00 -0800 (PST) Received: from [10.133.33.224] (tpe-colo-wan-fw-bordernet.qualcomm.com. [103.229.16.4]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a2f3c66bd3sm139239235ad.1.2025.12.23.19.20.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 23 Dec 2025 19:21:00 -0800 (PST) Message-ID: <9681baad-08b2-4935-a3d1-587458c3502f@oss.qualcomm.com> Date: Wed, 24 Dec 2025 11:20:55 +0800 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 v3 4/5] remoteproc: qcom: pas: Add late attach support for subsystems To: Dmitry Baryshkov Cc: Bjorn Andersson , Mathieu Poirier , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Manivannan Sadhasivam , aiqun.yu@oss.qualcomm.com, tingwei.zhang@oss.qualcomm.com, trilok.soni@oss.qualcomm.com, yijie.yang@oss.qualcomm.com, linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Gokul krishna Krishnakumar References: <20251223-knp-remoteproc-v3-0-5b09885c55a5@oss.qualcomm.com> <20251223-knp-remoteproc-v3-4-5b09885c55a5@oss.qualcomm.com> Content-Language: en-US From: Jingyi Wang In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-ORIG-GUID: NkEN2VrMieopHusHfRADV4uJ19p23W77 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMjI0MDAyNSBTYWx0ZWRfX7FSYVQQllC10 GjEmSF326GxhASxdlDBumnFWkrnx74bV9/R9PAWJSMWGrJVPmQkwt+s+J8dlsWHiV2/ZKCGaAE0 L/njXA2OmDu8OrHBEhWcZyJ9fhJSxE4ev7WHYfCsc5CpITKa92lN0eTGF6xrv5p7XLhr51Bkuaa QaSEu5jdVaRJNKQY5CJHNFHKK6N5/49oktkMFW47VqSDjGNGy4RucMFU4JVPE67ydDvOlDTYdB6 Vd0cx0WEKF012tah9Jlp2cT8Y95nH71f2LAKDaHv4HATLpWwv5Snx18SyemqGPsnEc5C7ajpAH+ zbEby/vzoJ6dIPJUe576lkDV+bfK/BpGvToiYw2U6gwiEyr2rDTT+eAMGcr9DE54FKvTbN7vI0j Pp/JKj5Injiz8YnaCZrauVB10A+384+ZOL152X8YIJZVPdMmaae6U4OzmTvqBpxR0BXrDl8lsXt fhMkvYoXoFN9Dqp5pHw== X-Proofpoint-GUID: NkEN2VrMieopHusHfRADV4uJ19p23W77 X-Authority-Analysis: v=2.4 cv=NZDrFmD4 c=1 sm=1 tr=0 ts=694b5c1d cx=c_pps a=JL+w9abYAAE89/QcEU+0QA==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=IkcTkHD0fZMA:10 a=wP3pNCr1ah4A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=AeEh3y5A5LJfT7oo4OEA:9 a=QEXdDO2ut3YA:10 a=324X-CrmTo6CU4MGRt3R:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-12-24_01,2025-12-22_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 spamscore=0 clxscore=1015 impostorscore=0 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2512120000 definitions=main-2512240025 On 12/24/2025 4:15 AM, Dmitry Baryshkov wrote: > On Tue, Dec 23, 2025 at 01:13:50AM -0800, Jingyi Wang wrote: >> From: Gokul krishna Krishnakumar > > So, two names start from the capital letters and one from a downcase > one? > will fix >> >> Subsystems can be brought out of reset by entities such as bootloaders. >> As the irq enablement could be later than subsystem bring up, the state >> of subsystem should be checked by reading SMP2P bits and performing ping >> test. >> >> A new qcom_pas_attach() function is introduced. if a crash state is >> detected for the subsystem, rproc_report_crash() is called. If the >> subsystem is ready either at the first check or within a 5-second timeout >> and the ping is successful, it will be marked as "attached". The ready >> state could be set by either ready interrupt or handover interrupt. >> >> If "early_boot" is set by kernel but "subsys_booted" is not completed >> within the timeout, It could be the early boot feature is not supported >> by other entities. In this case, the state will be marked as RPROC_OFFLINE >> so that the PAS driver can load the firmware and start the remoteproc. As >> the running state is set once attach function is called, the watchdog or >> fatal interrupt received can be handled correctly. >> >> Signed-off-by: Gokul krishna Krishnakumar >> Co-developed-by: Jingyi Wang >> Signed-off-by: Jingyi Wang >> --- >> drivers/remoteproc/qcom_q6v5.c | 87 ++++++++++++++++++++++++++++++++- >> drivers/remoteproc/qcom_q6v5.h | 11 ++++- >> drivers/remoteproc/qcom_q6v5_adsp.c | 2 +- >> drivers/remoteproc/qcom_q6v5_mss.c | 2 +- >> drivers/remoteproc/qcom_q6v5_pas.c | 97 ++++++++++++++++++++++++++++++++++++- >> drivers/remoteproc/qcom_q6v5_wcss.c | 2 +- >> 6 files changed, 195 insertions(+), 6 deletions(-) > >> @@ -247,7 +328,7 @@ EXPORT_SYMBOL_GPL(qcom_q6v5_panic); >> */ >> int qcom_q6v5_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev, >> struct rproc *rproc, int crash_reason, const char *load_state, >> - void (*handover)(struct qcom_q6v5 *q6v5)) >> + bool early_boot, void (*handover)(struct qcom_q6v5 *q6v5)) > > Separate lines > will fix >> { >> int ret; >> >> @@ -326,6 +329,7 @@ static int qcom_pas_start(struct rproc *rproc) >> } >> >> ret = qcom_q6v5_wait_for_start(&pas->q6v5, msecs_to_jiffies(5000)); >> + > > Nope, unnecessary empty line. > will fix >> if (ret == -ETIMEDOUT) { >> dev_err(pas->dev, "start timed out\n"); >> qcom_scm_pas_shutdown(pas->pas_id); > Thanks, Jingyi