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 1D2892EB87B for ; Thu, 18 Dec 2025 08:10:43 +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=1766045445; cv=none; b=butS+hljRkv9y1ykUqVUMQcqZ9hUg9ZYKiNyUWImIYe/dmbg+c8E/5En3t118XRhm91j+eTonoVrzY2iRGSANFMTQw+sq3GHAcE1Z0fFi2EdGkBKHKLy68oly4mB41F+Ay69t+cG07qnF93SMb8brJAMbWVILkjMjtSTe274Ja0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766045445; c=relaxed/simple; bh=ejOs6bkbsY8Vz8EZH6d+LncDHIbxehlNOId5lq1k/tU=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=e2tMw8a627DZigMtyV2xsGoS1NTgMzSgd/eo+ypzZdfI51KvI6kAX8FziITjJYG/yDYKoauUl52dmmDBHP3kRVBekfagsiiJCclzhnxwqUhjD5JpkXDd608BseKfM5vG3uRn2YWpjluTtOyZkA+V2y4Cf4cjKfI6jlqTCw1B9H0= 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=gtifw28w; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=BzDUdPfh; 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="gtifw28w"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="BzDUdPfh" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5BI1Yile237676 for ; Thu, 18 Dec 2025 08:10:43 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=qcppdkim1; bh=TCHXjv2VZsMwfFYNwJEOSh lKvgPdJRBzvcTy9Q4p/48=; b=gtifw28wKHhjmAbOFS666sg0d5Bpp1uSh2lNJD KMO5vt5rl9ugqqMhvXO08Cft9Hpcf6FRaY14u9xDXuc+zEY6hBJ/BDJyoHn1p4NL j71Iam1DysGrw1oqXDjGn+PH0VpKkMkY1Z90lTyBcxgm3zNqV7UglTyytZIWInwj 2FpcLSt+t1ADTohBsxnaehtpLPhesLYGmMvpcm4cevt4YOZdSRqZJLOJfEM9ghpw fCbOMiN+pkmm1hlWLdDk3ct/7L0VnkdIWf0khexKtePrlU/XQHiARZeT4rvULpUT /i7KtxRz6bQaC74kH9T0HZEkizyuQ5wFms2wX/LqFzCI9PdQ== Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4b44x3hfyf-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 18 Dec 2025 08:10:42 +0000 (GMT) Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-29f13989cd3so11735895ad.1 for ; Thu, 18 Dec 2025 00:10:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1766045441; x=1766650241; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=TCHXjv2VZsMwfFYNwJEOShlKvgPdJRBzvcTy9Q4p/48=; b=BzDUdPfh014QqpBFtnSxLdqadpEADcZm2pmeIZKODfXbpRsKXuRgxeB1XzsN7hb3dC DUsuTX1SRFWf9r+SXLbFekFkEuTMP9Z2bCZ8omxi7ldmkQigB65W5oESX5Y8bHrgV948 Q7WgiBQsV3X0TpZhfpSExufYWiFVIc5SM03zqMkvx31Hl3TlykTE+LMnwnwhwS0shylr nNHMZbyE/d1B2LtqnbC8irCpc8YOM66QeY8c69l39tyzFEUrNplqdOW4i3F9jKx/kyBw DWRkDZdRiVJxmmoeCP3/y1mUxXq1lsYWwRRPNJGnDrZoW+n6RraE140fiN4Wy3N/CNoY f5jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766045441; x=1766650241; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=TCHXjv2VZsMwfFYNwJEOShlKvgPdJRBzvcTy9Q4p/48=; b=FIBNXtnqn4ZTXlAWU21XR0O1BU4p1Ogtm8sAahV7tJpP+f0zHIp2KRRo3RCLMWDy6d YYwPtvBp0Q+pkZLhU9Ij/pwJNe7rc+bw/cIbX6+m6rWX6n7A8OP6DCqBOPaKirmqBymn 1x11QDVr8OPzqXq4rlBvALIu1lT8xLdxP4ofyQYtFLMPymvJq8Y2kj26A9HnfmMsP8e9 d8Kijl7QkceAl57ZTIhGd1mm//aDsNvKlqX77mvWyD5vkvDEmSAsqc9J1yil5raCv9Xr hWNU/NRPGeR32DY1DAL0IqkuqHcxHYboN0hnbsph6KHJ5leXjDWiPbG0srJxAk23WZVC xjxQ== X-Forwarded-Encrypted: i=1; AJvYcCXs4SRQMFl0wz4sBZ7/PydV1S0w7EqQGfMxfBZRf+ArBqVSm7Xhdw8glNT6VaL69JAMUE8kEiOeq4Vfbtc=@vger.kernel.org X-Gm-Message-State: AOJu0YxGh/fJowR1eRWq8NpuzWpW1TjifFE2uJd6mp85pERD2jPdnfLG YloqU28hvxXmLmIeXLLMk5B7a2Ceh9FZ5qtrWe48wJMrSI83ebptjqaQZg48mVpFB8eykSbONTY r+pucdswIZc1YIw62mOiY8to8utKUJbd5mc+LUeB+m9Af+riYwSk7YUbgyuHSpSPmfq0= X-Gm-Gg: AY/fxX7oELF6yugRb41h41Eby+O093HQA3S2rAVTtUa1baZ50Nei6BmXD8UraWL6QPu 8HDttTSIX98qKI3zlKf/9asYc6PeQOb6psW7ojTYYH47PmIQm6IZVPXKoVagofC2CDEPGF3keej jW22Q+erAc0rWNNXBtkyJGZK2yENRiM2Rd/fND9dY0x4Oa/qeD+gb+20v64Xj458caTYPGBz5iJ LITM7MfEkcUq0ifDmtBt9Ld3kGGqj9wI0rpcbrdtlCSbKVtlmdUlVQbOAwNJ4TjS78gnGw5k+H4 HdJ4Ws2+FW9CvbdEnVltRx6savJe6eNdPSevzinHvPYqn6+479Linmv5Ckfq2b9vz6kKD3GSMUO na1tBLiaHXQVVwdYeIFa+nK5IKxY+7nIN6+5EaAS6TQxnTYocJSGw0kPJsIbjvTKALZs= X-Received: by 2002:a05:7022:4581:b0:119:e56b:c762 with SMTP id a92af1059eb24-11f34c435c7mr17362398c88.39.1766045441097; Thu, 18 Dec 2025 00:10:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IEuYMGTp81NLT+B4cET/exVbTTF3Y5dVTJDSM1G5/qDqcjwsi88g0t8I+546Kb64PBfRSO7jw== X-Received: by 2002:a05:7022:4581:b0:119:e56b:c762 with SMTP id a92af1059eb24-11f34c435c7mr17362354c88.39.1766045440454; Thu, 18 Dec 2025 00:10:40 -0800 (PST) Received: from hu-yuanfang-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2b04e58d423sm2564824eec.6.2025.12.18.00.10.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Dec 2025 00:10:40 -0800 (PST) From: Yuanfang Zhang Subject: [PATCH v2 00/12] coresight: Add CPU cluster funnel/replicator/tmc support Date: Thu, 18 Dec 2025 00:09:40 -0800 Message-Id: <20251218-cpu_cluster_component_pm-v2-0-2335a6ae62a0@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="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAMS2Q2kC/3WNQQqDMBBFryJZN2KSppWueo8iItOxBjRJM0Zax Lt3Kt12M/A+/79ZBWFySOJSrCLh4sgFz6APhYCh8w+U7s4sdKWtqtRJQswtjJlmTC2EKQaPfm7 jJAGtqnsuHY0RPI8Je/fa1beGeXA0h/TePy3qm/6k+vxfuihZSaOMtR3YugZ9DUTlM3cj16aSj 2i2bfsA4vEq/ccAAAA= X-Change-ID: 20251016-cpu_cluster_component_pm-ce518f510433 To: Suzuki K Poulose , Mike Leach , James Clark , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Mathieu Poirier , Leo Yan , Alexander Shishkin , Bjorn Andersson , Konrad Dybcio Cc: kernel@oss.qualcomm.com, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Yuanfang Zhang , maulik.shah@oss.qualcomm.com, Jie Gan X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1766045439; l=5996; i=yuanfang.zhang@oss.qualcomm.com; s=20250814; h=from:subject:message-id; bh=ejOs6bkbsY8Vz8EZH6d+LncDHIbxehlNOId5lq1k/tU=; b=A2enXks82ZeVTKrJJRlTtv7jUD0gAgfNpcuVx2nZoiIaCK4V2y2M5wmxQDrVaMQjFy5ydmz0i ixR/yLK/uwkBgdL4n5CJJ/RblbW1X6439cLS6Yun0gtR13fA95nrPbO X-Developer-Key: i=yuanfang.zhang@oss.qualcomm.com; a=ed25519; pk=9oS/FoPW5k0CsqSDDrPlnV+kVIOUaAe0O5pr4M1wHgY= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMjE4MDA2NiBTYWx0ZWRfX+jLaYccVc2uf Dt/wBza6akycGV5u2kEdVFbVxTAgsWeC0MyxoNHcOlEG+VCVPBHosNtO1u1b8tnI3X/9xcDdGvJ zX0sgF/wnbRNFNVQDILlP1nI6c63EzEG4k3NOYqagWBfFhwjPig4BA3lXTfTOQGKX3K8pWnun6J 7Zj2KXc18BmXuTvBRuyvmbOTUl8CRpwdAdiAj3RHIZl5/7bi0DoGw2VHvIzAZ5/uayLCloebUPh oDnCOaHc7wN7cBDlCxYYduM9y0H0pOlr9PnkshogBY3cekjjAMTAWK4iO26FFXj3zYQTPKUDdJr Gge+dsxWc/LxVmhAYDz2uW6oVL+4LDWGxpQZmD1sPZhAoyY7/sdJ+7AKMEeRXFJcV16cPtz9mTc PAw63WTR5HYCsBlgCd/ULAv+n47RwQ== X-Proofpoint-GUID: BcGirjZyS6MzYaiY1-RlCq_J60Nskmo0 X-Proofpoint-ORIG-GUID: BcGirjZyS6MzYaiY1-RlCq_J60Nskmo0 X-Authority-Analysis: v=2.4 cv=Zpjg6t7G c=1 sm=1 tr=0 ts=6943b702 cx=c_pps a=cmESyDAEBpBGqyK7t0alAg==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=wP3pNCr1ah4A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=5LP_gHFhwREuHdR0VuEA:9 a=QEXdDO2ut3YA:10 a=1OuFwYUASf3TG4hYMiVC: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-18_01,2025-12-17_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 bulkscore=0 suspectscore=0 spamscore=0 lowpriorityscore=0 phishscore=0 malwarescore=0 clxscore=1015 impostorscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2512180066 This patch series adds support for CoreSight components local to CPU clusters, including funnel, replicator, and TMC, which reside within CPU cluster power domains. These components require special handling due to power domain constraints. Unlike system-level CoreSight devices, these components share the CPU cluster's power domain. When the cluster enters low-power mode (LPM), their registers become inaccessible. Notably, `pm_runtime_get` alone cannot bring the cluster out of LPM, making standard register access unreliable. To address this, the series introduces: - Identifying cluster-bound devices via a new `qcom,cpu-bound-components` device tree property. - Implementing deferred probing: if associated CPUs are offline during probe, initialization is deferred until a CPU hotplug notifier detects the CPU coming online. - Utilizing `smp_call_function_single()` to ensure register accesses (initialization, enablement, sysfs reads) are always executed on a powered CPU within the target cluster. - Extending the CoreSight link `enable` callback to pass the `cs_mode`. This allows drivers to distinguish between SysFS and Perf modes and apply mode-specific logic. Jie Gan (1): arm64: dts: qcom: hamoa: add Coresight nodes for APSS debug block Yuanfang Zhang (11): dt-bindings: arm: coresight: Add 'qcom,cpu-bound-components' property coresight: Pass trace mode to link enable callback coresight-funnel: Support CPU cluster funnel initialization coresight-funnel: Defer probe when associated CPUs are offline coresight-replicator: Support CPU cluster replicator initialization coresight-replicator: Defer probe when associated CPUs are offline coresight-replicator: Update management interface for CPU-bound devices coresight-tmc: Support probe and initialization for CPU cluster TMCs coresight-tmc-etf: Refactor enable function for CPU cluster ETF support coresight-tmc: Update management interface for CPU-bound TMCs coresight-tmc: Defer probe when associated CPUs are offline Verification: This series has been verified on sm8750. Test steps for delay probe: 1. limit the system to enable at most 6 CPU cores during boot. 2. echo 1 >/sys/bus/cpu/devices/cpu6/online. 3. check whether ETM6 and ETM7 have been probed. Test steps for sysfs mode: echo 1 >/sys/bus/coresight/devices/tmc_etf0/enable_sink echo 1 >/sys/bus/coresight/devices/etm0/enable_source echo 1 >/sys/bus/coresight/devices/etm6/enable_source echo 0 >/sys/bus/coresight/devices/etm0/enable_source echo 0 >/sys/bus/coresight/devicse/etm6/enable_source echo 0 >/sys/bus/coresight/devices/tmc_etf0/enable_sink echo 1 >/sys/bus/coresight/devices/tmc_etf1/enable_sink echo 1 >/sys/bus/coresight/devcies/etm0/enable_source cat /dev/tmc_etf1 >/tmp/etf1.bin echo 0 >/sys/bus/coresight/devices/etm0/enable_source echo 0 >/sys/bus/coresight/devices/tmc_etf1/enable_sink echo 1 >/sys/bus/coresight/devices/tmc_etf2/enable_sink echo 1 >/sys/bus/coresight/devices/etm6/enable_source cat /dev/tmc_etf2 >/tmp/etf2.bin echo 0 >/sys/bus/coresight/devices/etm6/enable_source echo 0 >/sys/bus/coresight/devices/tmc_etf2/enable_sink Test steps for sysfs node: cat /sys/bus/coresight/devices/tmc_etf*/mgmt/* cat /sys/bus/coresight/devices/funnel*/funnel_ctrl cat /sys/bus/coresight/devices/replicator*/mgmt/* Test steps for perf mode: perf record -a -e cs_etm//k -- sleep 5 Signed-off-by: Yuanfang Zhang --- Changes in v2: - Use the qcom,cpu-bound-components device tree property to identify devices bound to a cluster. - Refactor commit message. - Introduce a supported_cpus field in the drvdata structure to record the CPUs that belong to the cluster where the local component resides. - Link to v1: https://lore.kernel.org/r/20251027-cpu_cluster_component_pm-v1-0-31355ac588c2@oss.qualcomm.com --- Jie Gan (1): arm64: dts: qcom: hamoa: Add CoreSight nodes for APSS debug block Yuanfang Zhang (11): dt-bindings: arm: coresight: Add 'qcom,cpu-bound-components' property coresight-funnel: Support CPU cluster funnel initialization coresight-funnel: Defer probe when associated CPUs are offline coresight-replicator: Support CPU cluster replicator initialization coresight-replicator: Defer probe when associated CPUs are offline coresight-replicator: Update management interface for CPU-bound devices coresight-tmc: Support probe and initialization for CPU cluster TMCs coresight-tmc-etf: Refactor enable function for CPU cluster ETF support coresight-tmc: Update management interface for CPU-bound TMCs coresight-tmc: Defer probe when associated CPUs are offline coresight: Pass trace mode to link enable callback .../bindings/arm/arm,coresight-dynamic-funnel.yaml | 5 + .../arm/arm,coresight-dynamic-replicator.yaml | 5 + .../devicetree/bindings/arm/arm,coresight-tmc.yaml | 5 + arch/arm64/boot/dts/qcom/hamoa.dtsi | 926 +++++++++++++++++++++ arch/arm64/boot/dts/qcom/purwa.dtsi | 12 + drivers/hwtracing/coresight/coresight-core.c | 7 +- drivers/hwtracing/coresight/coresight-funnel.c | 258 +++++- drivers/hwtracing/coresight/coresight-replicator.c | 341 +++++++- drivers/hwtracing/coresight/coresight-tmc-core.c | 387 +++++++-- drivers/hwtracing/coresight/coresight-tmc-etf.c | 106 ++- drivers/hwtracing/coresight/coresight-tmc.h | 10 + drivers/hwtracing/coresight/coresight-tnoc.c | 3 +- drivers/hwtracing/coresight/coresight-tpda.c | 3 +- include/linux/coresight.h | 3 +- 14 files changed, 1902 insertions(+), 169 deletions(-) --- base-commit: 008d3547aae5bc86fac3eda317489169c3fda112 change-id: 20251016-cpu_cluster_component_pm-ce518f510433 Best regards, -- Yuanfang Zhang