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 C75CF23EAB9 for ; Fri, 19 Dec 2025 01:50:28 +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=1766109030; cv=none; b=asV3nTb4lpRKwH/VaNwyUTZ/KDcMPj3pQdohZtxEwJMBD3lK4U6OIeOf60b2BD1q7IYP0bwSlAzUOZbeSrfwJlqzpBzpApXjjzY28d4rx+C3mrV5cBVDhqqsLk8XBaA7lDTos4acXhvk/dn61QSsX3jnuYuzsX9KVS9cirKL9Ew= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766109030; c=relaxed/simple; bh=MNAphZ9trmx3sx5L/qPBZYe+qprYs1ZjhbXycfXJC38=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=U9z184BYAHYU6aJYRdHs3Kuya5u4Z9P2XSfDNaOd1V3T4WekB9CgLdUYssejr7W5DkJpo+P8ZWlMmmbV4srt7jNo4pJV2UlPIXK0ruwSJGCglXGu/7zhjTngWYwmLZkhSdVjvl4L/FXeFQFZ6Rc+eivETuqQWAm+yyJ1eEa+XWE= 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=kXewOona; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=c+AhjCe4; 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="kXewOona"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="c+AhjCe4" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5BILlcxK3086168 for ; Fri, 19 Dec 2025 01:50:28 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= 0HQgQjmle1DtbIymifpD7qH0zWYdMBbbPWC8FYwX124=; b=kXewOonaKO6yCrcr 7gAhuwJrSPaEY5iHJXkG1uxEPquBbWWxtXF1+UhF2Wx/EBq5wabqNgiw7maTMruA TAqp9mmjgRNaZ9J/NK+B6wwxKBfLUAodVtRUalwmatBoEuicSF4X4+NPHs9H2Xc2 ksJDPZmPxQDibhHMorJqREK8aXJTjsvAp/fm2oSks17O0bAr6mrsiVT7HgYTtE+J 2oXCiYohCH97MlJ2PXDcY16rcpUR7AomtTZih1+Lq0IrLsDo3f5QsDt3NRrcUM8G altotbF/7UEkUBdIuqHBYXO6FDwUSJsawsGgtKtQn8jAwtcLxM/8JYvGFvyM4BgR u/RvEA== Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4b4r2c0try-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 19 Dec 2025 01:50:27 +0000 (GMT) Received: by mail-pf1-f199.google.com with SMTP id d2e1a72fcca58-7b9ef46df43so1653097b3a.1 for ; Thu, 18 Dec 2025 17:50:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1766109027; x=1766713827; 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=0HQgQjmle1DtbIymifpD7qH0zWYdMBbbPWC8FYwX124=; b=c+AhjCe4D0FWE9ZfPDXLESGT244G7JiffLM2CniikYnMRxaUQ4iw1o4voY8Wiaa7GH 96mY19/T1HEjntBPMOf0OngAJ+0PDf7q/Aj+Kbw5oJvoJ9bc6ewQfIbfGtG/Z77eXvyC VvnEEDAsoi1pdUqEsv0hknPDCgZOxCRT92pYyHZ2r3u0JwJi/4dH/Da2wnIVIuUD4+Da rnnXBzr1KUO6/QUNOT2i7iJrM31aseybJf98WW9SgZDLhcqZ3FkfP+Zux/MuEJUhvRRO PScnPv7sKhvYLCK7Hco+imw1PKepg4szIP32q0CG/A8IwrvX9+G88hau31anzc9R8J/m J6sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766109027; x=1766713827; 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=0HQgQjmle1DtbIymifpD7qH0zWYdMBbbPWC8FYwX124=; b=dI8Sx7yQZAkg95Cmn0zfTIpG5CPTNFgI4hW7p+QktJ4l2wfaqG3UoOTipSbECSGpiR 56E6SFX1yEbTlQwkVPgpsG+vmLepsHqsNfW4BQj40x1PHZdNVjheVMWxgaP3IWZD1Snm GRiYyhT4WOK7zLTTn8TXPwpKzDVZtLOB5d0+E464duQN40e6PjoBsl//W26YldopYKqj fFq94xfKUK/2u/2J4yglNAh3q9JVjKe2af2skcKZMXX9IXKmm+gz3XQLbzKRvQE9yF9d AWUjZiSK3WeHU2Y8rRYiUR35hagv3MCr8y2vQwbJCD8q6WPdM6hePPWBzhalWp+JjlXI g1GA== X-Forwarded-Encrypted: i=1; AJvYcCWt0IVPsxzxBQ4ZjoZa22xLLpony/2fpMLZ6Z0fyIwDaVHrE/eiL5P9gYY6eUrr7FSEZ9RFISj++tQxfPM=@vger.kernel.org X-Gm-Message-State: AOJu0Yxt/N1d0MH5FvZrS/hN9c+eIGJtAOXx0iJ2gFmgP03X7YZK8su0 2Z88gf+pgGHVwe8CeAMgU8DBZJR90e6Vm6WdMlP8xzNpeRL/XhaNhh0jrCF+Qjq46A3FlnendID OpHybP1yZE3+Bj39l1I6dux5KwFJ9g68zmgGnLxoJ8beqBBDuKtw/e7TiRLdAnuvNP2c= X-Gm-Gg: AY/fxX6p/HORC1Z0fHKiQ6EtCU2CsnecsTCCNb9ZddUZ/bxS/poqfr5CJelQhw24doD SkQTiviLkM9YzfufTFmS9jvIh3csZO+i3emFLQcjajAQmSNo9B6JX7149jgH1LY531Qp1rcMPgI XoKGyCP8A8RsXIILhekxvNK0JgVvp+T5+ZTrC4j+z60FqC7tVJw3hn999NNe+BDKzhMoEuUWJDc O2sWDSxvwdXZVeUNOpTqMYG7va3NORA7Hdj2T8rLyG9rsYQBfJx0+q7PJji2WWxWXHMy4SoqeP/ gWbsAkbSI4/r/2m+qbliPoN6NpkHNiWmrsESjHVx8M+phBsnWCE7ru2AbJfE9sGc/H4E4jUuiTT kpVYr5ApGTB0vF+K01TRCBbBmVPPvSeRLWDHHel+k2VhgXPE3IyBmHVJrojtUpM8vk6KjJIWQVl FqUZuMeyqJ X-Received: by 2002:aa7:9301:0:b0:7e8:4587:e8b5 with SMTP id d2e1a72fcca58-7ff65f78aacmr1242196b3a.40.1766109027221; Thu, 18 Dec 2025 17:50:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IH97khf7iYUM3NJRGaT7+S3mpVjpomkGCij9OOBYjEiHynxY+nzs5snhowicWJSLEzj+HtI2w== X-Received: by 2002:aa7:9301:0:b0:7e8:4587:e8b5 with SMTP id d2e1a72fcca58-7ff65f78aacmr1242162b3a.40.1766109026671; Thu, 18 Dec 2025 17:50:26 -0800 (PST) Received: from [10.133.33.101] (tpe-colo-wan-fw-bordernet.qualcomm.com. [103.229.16.4]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7ff7e0a19besm568706b3a.40.2025.12.18.17.50.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 18 Dec 2025 17:50:26 -0800 (PST) Message-ID: <927f15d5-da2a-4282-b80f-c1c7563a4367@oss.qualcomm.com> Date: Fri, 19 Dec 2025 09:50:18 +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 v2 00/12] coresight: Add CPU cluster funnel/replicator/tmc support To: Leo Yan Cc: Suzuki K Poulose , Mike Leach , James Clark , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Mathieu Poirier , Leo Yan , Alexander Shishkin , Bjorn Andersson , Konrad Dybcio , 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, maulik.shah@oss.qualcomm.com, Jie Gan References: <20251218-cpu_cluster_component_pm-v2-0-2335a6ae62a0@oss.qualcomm.com> <20251218104027.GA1790402@e132581.arm.com> Content-Language: en-US From: yuanfang zhang In-Reply-To: <20251218104027.GA1790402@e132581.arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Proofpoint-GUID: xq3C4FNPOP4AHwNo8NFy7gaqPPT33q39 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMjE5MDAxMyBTYWx0ZWRfX0gCL6/TIPEpz QA0pV2r+em9EiYSNci1vojjSbgL+lMRDhBZfj+VC7pYjGFeVr9VhfckLMyvh01Y/65b4BXRZ2O+ xQMgXUqQf91JVxh8F4o0NRl8Yzh6D1/DQd+85fSAeioT6NmUZIIWegAmBZnRai5NN9jSMmGHcot dL17omA/9O0Fc0hUHCFYAL4miKtiqCwkuhXHZbIXbEGILK+SpTHHowYuLiykx9q3FxKT0ILTpYZ kv637EPQ2CvaEsN/Zdf5JRopcJ+eON4PJa/ZP6IvTgEtehU4518M13h+HCzByYQkNcPffk+n03E /g5tvxB7u+nkaMdv5Zeul+bN+2jpXHLwKscup1POmEz+7JEZSKKz4s3DVdQQDDie4O1xqO+j+mZ UbhHohdgPTV4kYJwhdXDCwY94IbuOoWOVsSqyoBAl6YogxooVspc/cABwXNEZBSoNe9WYiIOecX fqT+wSuJWwModkIoq4w== X-Authority-Analysis: v=2.4 cv=feSgCkQF c=1 sm=1 tr=0 ts=6944af63 cx=c_pps a=WW5sKcV1LcKqjgzy2JUPuA==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=IkcTkHD0fZMA:10 a=wP3pNCr1ah4A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=CT3mT5stn3mpJVhV_EcA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=OpyuDcXvxspvyRM73sMx:22 X-Proofpoint-ORIG-GUID: xq3C4FNPOP4AHwNo8NFy7gaqPPT33q39 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-19_01,2025-12-17_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 phishscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 spamscore=0 lowpriorityscore=0 adultscore=0 bulkscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2512120000 definitions=main-2512190013 On 12/18/2025 6:40 PM, Leo Yan wrote: > Hi, > > On Thu, Dec 18, 2025 at 12:09:40AM -0800, Coresight ML wrote: > > [...] > >> - Utilizing `smp_call_function_single()` to ensure register accesses >> (initialization, enablement, sysfs reads) are always executed on a >> powered CPU within the target cluster. > > This is concerned as Mike suggested earlier. > > Let me convert to a common question: how does the Linux kernel manage > a power domain shared by multiple hardware modules? > > A general solution is to bind a power domain (let's say PD1) to both > module A (MOD_A) and module B (MOD_B). Each time before accessing MOD_A > or MOD_B, PD1 must be powered on first via the pm_runtime APIs, with > its refcount increased accordingly. > > My understanding is the problem in your case is that the driver fails to > create a relationship between the funnel/replicator modules and the > cluster power domain. Instead, you are trying to use the CPUs in the > same cluster as a delegate for power operations - when you want to > access MOD_B, your wake up MOD_A which sharing the same power domain, > only to turn on the PD_A in order to access MOD_B. > > Have you discussed with the firmware and hardware engineers whether it > is feasible to provide explicit power and clock control interfaces for > the funnel and replicator modules? I can imagine the cluster power > domain's design might differ from other device power domains, but > should not the hardware provide a sane design that allows software to > control power for the access logic within it? > It is due to the particular characteristics of the CPU cluster power domain. Runtime PM for CPU devices works little different, it is mostly used to manage hierarchical CPU topology (PSCI OSI mode) to talk with genpd framework to manage the last CPU handling in cluster. It doesn’t really send IPI to wakeup CPU device (It don’t have .power_on/.power_off) callback implemented which gets invoked from .runtime_resume callback. This behavior is aligned with the upstream Kernel. > General speaking, using smp_call_function_single() makes sense if only > when accessing logics within the CPU boundary. > > P.s., currently you can use "taskset" as a temporary solution without > any code change, something like: > > taskset -c 0 echo 1 > /sys/bus/coresight/devices/etm0/enable_source This can address the runtime issue, but it does not resolve the problem during the probe phase. thanks, Yuanfang> > Thanks, > Leo