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 409313932F9 for ; Mon, 10 Aug 2026 11:29:10 +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=1786361352; cv=none; b=UCn//SNsvNanf5LPEQIjzrHSaKl2qfOQbx2kc7YKw4yYr2Ytjbuy8XMSwq3TanaTOSscj2xPZ8hjpMbNrDYyahqq0a184cwY2rb6g/qwbQAtDZDoQfYg1SpxBPg6SsgDF1bLaHox7fmvFxj9qo/VjX/EAQ0SYxYtYem1e95F4Lk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786361352; c=relaxed/simple; bh=P+cSSRXvzNv9ywbkiaiji1QehkPwo0WawB8Vtr8v4Ww=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jBb9XalFV2JGeN0ectidpSMt2tb9J3AH0dIBYgWyJfZPtwAA1pXdwwLYYN+siN45IqwhpI4SupWi+nF23m9Dx4k/uHTM0iZFw0r3oMVqfTNLdczF6tHuS/MLkHY05egAYX4xLX+BByV8dY81yZg2n7YHJkdtehZd7cLmI0bhfZ4= 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=DdMs2iTH; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Rw/+m25h; 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="DdMs2iTH"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Rw/+m25h" 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 67A9SBlQ446601 for ; Mon, 10 Aug 2026 11:29:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=qcppdkim1; bh=66vf1/j/yffpMkpZE7IG5N5/ 5iGkvuETwh2qPT7BKrw=; b=DdMs2iTH088ZazOLL3MAsvXrrv8ePhsyxsykaKGs 2x8WBfmjCBBHcwBvgEZ0OyeULotkmS4qbAa3Taoz55r9SIBgKM3M+YAMVQ1FrDry D+P1drC1tjjmhCagMoDjepG4XNEMylt+Re+ncemdqG6J28s02NepVGOR/JTBV0KE gGljREpIcpvzYXgZqplZqaf+cAlPciFs7YgIx46J6Vu8w9AREuun8PDWaD8y+Cto ilHGNF2iZiWxfNmGXHz0JxgEAnu5g6NfNqtbXiiyoAqn+0ontKqFONYBtoy83GO0 kvQAxQvOhZ7fjI9dOj77H8g/Tap8josOz/TuZghcGDT86w== Received: from mail-yw1-f200.google.com (mail-yw1-f200.google.com [209.85.128.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fy8v9164y-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 10 Aug 2026 11:29:09 +0000 (GMT) Received: by mail-yw1-f200.google.com with SMTP id 00721157ae682-81b0c72826eso45649777b3.0 for ; Mon, 10 Aug 2026 04:29:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1786361348; x=1786966148; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=66vf1/j/yffpMkpZE7IG5N5/5iGkvuETwh2qPT7BKrw=; b=Rw/+m25h0PP2n1Kb6Ytyyk0+0g+oMx7eAb0GkIJBn+zcZGuCBPy3897m6CqgPAE2PO ZrESZqFvlQJyYAIicuA00s75eEstgQoKOS12eNNsGI/g3MSy6MGX0b8HnhR/RRt7g77U /LA2NLVl9vm/EAaJSKAAr3i1T/4Tpw8Cg3VAgp4qCW5AVoFUqjvwTQYC5boJmtMYc9SR Ol2Vb3bx4LyeFidMy0sxgRBGMpzfkfvz7sHF03tqHICuNsy6U1XktrZyzf4SmYhpl+YA rSjbX6A6KxEPFbu9o49vxHj5lEbQG8jZhdBool46HJyUlvGNaRaVfb9rm3FlsVsxKf7M LlBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786361348; x=1786966148; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=66vf1/j/yffpMkpZE7IG5N5/5iGkvuETwh2qPT7BKrw=; b=FZt0IGSXAonIltH9ZSLExw3k7A1TNiY+ydBEk3xMKCd70AcehzBiqV0ukEHSFQd8WH KBcCGg5Kee9lNpT58+wZhvIK1beN3Sesir969cB3mFc0aCSdJwCQPC3tmC7zKytOlYC1 tn1XdzARgB2kLgeIdkCV2THWuFim/Ux9WQg3D6qMSEZlbTqhBzA7o2JtcsN2VCePa5zr huhtlpDIQtSivcLHKMJGzkPCCZMIbiltvvGXU5H37SUZz7ksakfXX1AfH8O1A2aM6la1 f98JpsUBEVECeo++Fxz+LTslbC3tuxIUhEw2uwKAWbViIFHo4OdzHY6COgRhpXtxW2Hl 2PMQ== X-Forwarded-Encrypted: i=1; AHgh+Rp1cXwNvOni2PDD7454OjhQHqHlvhpMBloHFpELOImcIndShLcZJW5G6dPRsJFxmKciiYQ3jwOp31CIkAk=@vger.kernel.org X-Gm-Message-State: AOJu0YzKX2HszRhr+jE8VEdNS0twfA0AyKtHNI8Pp8/YMZUdWKJFdqWY W+5NDm5UUvVV/WFUYgiNQOvQX39qrI4bXQ/SK8Bf2zIz4MVs2rQprruN+sqdoAHPSd2kMgVOjOC mMvoaJyDbmiB3GuE8j4W1E+Cy7FidIMh55V+PBwksmwVb5S3JQIbkepZsSZe6Nn7zCAE= X-Gm-Gg: AR+sD12mV+FpT02nXVCP36u3tuwi5RW95ScrzFlKCRyL+KOv7CyLzJxGZJcnV5C1Am9 yA4SLpqbryf0v5kVfngD/epfx8b+DIvtr+YLMbTKvMlM8qyHg4Z0099JUevkt9f69hwVoCA5Qgv KniFNp2pSjd4FM3Z7lBjVjRNw770cu262Sq+rthPLcuqQMdTkISOpF+6gRsFq3PykPsPi76Kqtj 0Y8/3iV5dZP3eRANLHj9eS8+Tp7BkVB53BAg682aQ+x0yPCFKBwCEUCyfIcGZyooFOxCZkqjaRI U3/j+j1ovHrcdPirSOIjHSZg8tsjwzsVsU94n8rww65zq5w9IkdAQD5IAupLVmKmt9TLDh2wgGe utPB1ICMx11xnwutjYKB5M4N7rg1VhQFvMNAzhs7VCOs= X-Received: by 2002:a05:690c:e3e8:b0:820:de0:6264 with SMTP id 00721157ae682-82d238d99d4mr3777887b3.0.1786361348574; Mon, 10 Aug 2026 04:29:08 -0700 (PDT) X-Received: by 2002:a05:690c:e3e8:b0:820:de0:6264 with SMTP id 00721157ae682-82d238d99d4mr3777587b3.0.1786361348055; Mon, 10 Aug 2026 04:29:08 -0700 (PDT) Received: from QCOM-aGQu4IUr3Y (i-global052.qualcomm.com. [199.106.103.52]) by smtp.gmail.com with ESMTPSA id 00721157ae682-823efa07c0esm53606337b3.1.2026.08.10.04.29.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2026 04:29:07 -0700 (PDT) Date: Mon, 10 Aug 2026 19:29:01 +0800 From: Shawn Guo To: Bjorn Andersson Cc: Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bartosz Golaszewski , Deepti Jaggi , Mukesh Savaliya , Yadu M G , Kuldeep Singh , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] remoteproc: qcom_q6v5_pas: add HPASS ADSP cluster boot-order and SSR coupling Message-ID: References: <20260810110726.775084-1-shengchao.guo@oss.qualcomm.com> <20260810110726.775084-3-shengchao.guo@oss.qualcomm.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: <20260810110726.775084-3-shengchao.guo@oss.qualcomm.com> X-Proofpoint-Spam-Info: AW1haW4tMjYwODEwMDEwMSBTYWx0ZWRfX9XAtH6ijtnt3 dm5yWmN0kp5JueX6rZitkfB0er3Q8LpF49ie8GEtVNSxKhSQwhx9CEB50ud42lZgyspkBwYG3KR MNZRTDscia0OHHcgGyAWZmtIauBmHNc= X-Proofpoint-ORIG-GUID: hm91VxcPiXfSE-V8YldDniiesxmZsR9X X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODEwMDEwMSBTYWx0ZWRfXzDIqORHTlzh3 A/10M8y236LRtNBhxEXxzQcB1VSL7kOu3BUsTv4w2XToe4E+fxs42vQbH0zwGw8ph3Ul9njEKZC Seu1PH3NYCSCr5zSCDgYFabP1ZsRojLLd/ECl2Ts/YtI1CqmzRdZs9qlnJHBkEp+XGz4r+/KEua UX91lAxHlKa/zSKGJCCG1LXayPts2iCxHgvN/nzRD3WyL7xa/YQIqnKttCIrPEmB92CazdnDkMW T7Tr9BsqTREiyMZ8rEsDSxQkpTuAuD9DOKNc3pdLwYyeErZBwfbMSsKRb4SX/xIJeT1jaj35/eZ rL/e/5vYivxtN+TqnhG7FmuCKnL15YmJQ2atgMxZ2XVgkKmExOJ/gB2jjxgRG8u6CoNT0UUgMx4 cVJSBOFF1Nb7tXu+2IVlPEzFhBOJXO/tcdjDId1AFPkHtcaqJGEIAb4/OfJck6qog9MtsWe4MgI YSpGpd3RlVmMJFwjsaw== X-Authority-Analysis: v=2.4 cv=T5m8ifKQ c=1 sm=1 tr=0 ts=6a79b605 cx=c_pps a=NMvoxGxYzVyQPkMeJjVPKg==:117 a=b9+bayejhc3NMeqCNyeLQQ==:17 a=kj9zAlcOel0A:10 a=Sv0fKeRqtYgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=7UsneLLXRh_0qPm5NQwA:9 a=CjuIK1q_8ugA:10 a=kLokIza1BN8a-hAJ3hfR:22 X-Proofpoint-GUID: hm91VxcPiXfSE-V8YldDniiesxmZsR9X X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-10_02,2026-08-07_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 adultscore=0 clxscore=1015 suspectscore=0 phishscore=0 spamscore=0 malwarescore=0 priorityscore=1501 bulkscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608100101 On Mon, Aug 10, 2026 at 07:07:21PM +0800, Shawn Guo wrote: > Some Qualcomm SoCs (e.g. Nord's HPASS ADSP0/1/2) group multiple PAS > instances that share clock/reset/NoC resources: one instance (the > "root") must finish booting before its siblings can cold boot, and any > member crashing, or being manually stopped on its own, must bring the > whole group down and back up together - matching the downstream > coupled-SSR ("MDF") group model, which never leaves the group in a > partially up/down state and has no notion of restarting a single > member alone. > > Add a shared, kref-managed struct qcom_pas_cluster (mutex, members > list, waitqueue, booted/restart_pending flags), looked up or created > order-independently in qcom_pas_probe() keyed by the cluster root's > device_node (works regardless of which member probes first), and torn > down via kref_put() in qcom_pas_remove(). > > Non-root members now wait for the root to finish booting before their > own qcom_pas_start()/qcom_pas_attach() proceeds (qcom_pas_wait_for_cluster_root()), > and the root marks the cluster booted once it completes its own boot > (qcom_pas_cluster_mark_booted()). > > A new subdev callback, qcom_pas_cluster_stop(), fans a stop event on > any one member out to every other member: a real crash is propagated > via rproc_report_crash() so the whole cluster crashes and automatically > recovers together, while a manual (non-crash) stop instead force-stops > every other member via a deferred rproc_shutdown() (run from a > dedicated work item, since calling it inline would race with the > target's own concurrently running IRQ-driven state machine). A > restart_pending latch ensures only the first member to observe the > stop acts on the rest, and is cleared once the root reboots. > > A manual start of a single non-root member is deliberately not turned > into a whole-cluster boot: qcom_pas_wait_for_cluster_root() just waits > out its timeout and fails if the root isn't already up, rejecting the > solo start rather than force-booting the root on the caller's behalf. > --- > drivers/remoteproc/qcom_q6v5_pas.c | 271 +++++++++++++++++++++++++++++ > 1 file changed, 271 insertions(+) Sorry! Please disregard this. Shawn