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 0963A23BD17 for ; Tue, 11 Aug 2026 05:50:20 +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=1786427422; cv=none; b=uxiItRHUiGPcdipZeT/+Pa+T0MSQ+GWe79POsVK04oULZH4HIT2SqZJ+93Y79eLeMB3VR4O//KesC2Xw4OjM6XZIP9hmFq22IiRjwy0O/Oj8oueEzj6liXtqA2u//zdx+GFAb/MsVR0X1A9BH3JwridBreZ/vqqmFPaAjkFLs08= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786427422; c=relaxed/simple; bh=YxRmzsXwL69qEXZhxMu1pjQ0toXga7vJW3wqY1JbwA8=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=ZlrSflfA4FXDTg2Dn2MtAhi8XIEvTOzCGms97q69OF53sEsVLSjNX0M/FRVZk/f80rrkGPHl1/EdppAaNcf2AqaQuVmhGNT7HMnw74zsTJxH4x2efdjyKXCLKLORGqi5F5VZgNFmc/9wIqDbQDOmfD7ebJNY98+N5e3TAto3dNs= 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=edyXknsu; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=KlTUUbah; 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="edyXknsu"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="KlTUUbah" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 67AMprOv3552900 for ; Tue, 11 Aug 2026 05:50:20 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=zlCU+1Hoxq1rQXyfHtQVCx 21WrqoA84d1mAPvKqjLm0=; b=edyXknsu7Ac2Lf5UgRXVSbuPpaXr7ciSk3O+XC Tz35O8rSIDzaRsBI6jgoJ9eiBaL5wjpFGAm/84bPkMVSUS0SVLRyMpuZN6o1k+fH DMz4M0h2fNTI8BbAmNOR21FdTfeJyHMxUoFA+aitAmsiAJINu4qiOnhYnhW4sLAA U6WUj6hSHVwkZZBFa4lFDReufwyCg08tRlqByLBYY2VBE1Cl8smE47RHwcY+KEDU ecICVq8gN9zsWiuCkk0dd9Oj44aY4z64IoLUglwJBzEMKg+xSp+7tg7jzuuAZAZ0 pHBEYIDAhZvn+0N4mOs6I+VVL3+YIrgkCnenvK7kANeSAEvA== 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 4fyqmk16jh-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 11 Aug 2026 05:50:20 +0000 (GMT) Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-2ce7dfd33ffso6269765ad.0 for ; Mon, 10 Aug 2026 22:50:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1786427419; x=1787032219; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:content-type:mime-version :message-id:date:subject:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=zlCU+1Hoxq1rQXyfHtQVCx21WrqoA84d1mAPvKqjLm0=; b=KlTUUbahI8gvIi/m/zEzowCWVoQevVOZTw853a6VTX8UYZkLTNfCjSHVBojbLGfqai 0kSO3OD8b5V1a+HIedM5JfnAeEyUSzxq8l76uXyyRn81xdN7SXWH2o4AbxV3C3B0rBuv nzfVpgkpbOYs3j6c8e+/DxZ+QQWHE9HLbgRJe7Qv8mxyi6zS2KSvDsgCj8q1Qtr+wSe9 CP2OTGZ4WXChbKj1eNbVTznN1YdEIh76J0nf5dRKRok397Wp9mKDFG9QcfaHkSg0UW9O 1Yu8QBGKDz3Hsj8esvPbUHtnV28m90ZJ4LFjW5bzV76R3kb3JWLKyAJQ+DDn+tDM5lAN y5FA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786427419; x=1787032219; h=cc:to:content-transfer-encoding:content-type:mime-version :message-id:date:subject:from:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to:content-type; bh=zlCU+1Hoxq1rQXyfHtQVCx21WrqoA84d1mAPvKqjLm0=; b=DI7uk5hQVYpAOktVs4hPsTzytTW10hGzAgCGkKsU20vUH8EDWg1CaJN3M4qc6B5Hcg YoBUE4mUBwoQtFkVhQDQk6BFiZyLTQ/GN7Q46oLv/hbpghSD754uYcDyp6dlyYNxuBau BQ1w/XwFwtb7Lj0dZQ6Uft9tIuZXJKH/wCg78EgGrQv++ktbmxSWslo2zbuTnnK7pe+U VDi/tvrlyN0aBaifMpzDaGhUwBzXlq7TFj/5d5YKaur7K0eOTHotl7CnHdCgOGe7z5Xo NbuwJ4i5+F/GcBWeEzqU0HZgZd8ioXNUYW4HFMO34ugjnezmn8JM1/xPyJlNCCXCgOsh ZOIg== X-Forwarded-Encrypted: i=1; AHgh+RrjNKVGIQQvexo+wOfZCuiDQiHp+t8JrhAW5NsWrZZeb/jttxicr7x3Iw98KF9LlCrYY2PS5g17pNdc8g0=@vger.kernel.org X-Gm-Message-State: AOJu0YyF9DV56sSBkKtPIml8u9gVrhonx5W2dHRZlGLb2lT99JP356jT W9ybefQ4qRtLKoyBYR2XY2V/zTDjxT6RQL3gmY7xtP8BJ1hXuC4apD8QNdecUxyqtqdITPtHIAL Ck94bmNhlCJp/92UavP1EYXDN+KPbyi8FIYAX2/lO3kcAlUaXSRx/mhBXpuBrociEW38= X-Gm-Gg: AR+sD13+tXuGbLYzqttGyBZfmkR13eF+3WP8LAioypxNrPRo+mBoQwkasz3UnZmGPH3 6uw8KAN96Jn0YVOcbpMgz0aB+6U8dP/r3adkx159SSGrTENF3zTkda5rdEdDaj8BgHQgy/xmJC5 VDaCyaa5+ZkzwKgWo41UAKAUDqWtLNU8cuC/rCdi18uKKAr8t24zk9dX+G64fYGaBWViytILDjK O5uG16AbbfZtTCwa1Cd3XUF46zBtwYcvR4iL4ovIzSKdG29ryNP778NlffaXN0s1UisK9nxy0au jhEn1KrnJu/ZpR9J8E1ubyTmyskPXkRuEw6wahotqfN7R4NtzMMZDcNI8emmEI9ElZAd9dOsQ/J ga+/TOS3I/XU+S5HQOAqOl1rxshM2 X-Received: by 2002:a17:90b:274b:b0:380:83fc:4315 with SMTP id 98e67ed59e1d1-392ec71cae0mr893347a91.21.1786427419522; Mon, 10 Aug 2026 22:50:19 -0700 (PDT) X-Received: by 2002:a17:90b:274b:b0:380:83fc:4315 with SMTP id 98e67ed59e1d1-392ec71cae0mr893298a91.21.1786427419032; Mon, 10 Aug 2026 22:50:19 -0700 (PDT) Received: from hu-mkshah-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-392d534ab78sm2062289a91.12.2026.08.10.22.50.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2026 22:50:18 -0700 (PDT) From: Maulik Shah Subject: [PATCH 0/2] cpuidle/pmdomain: Correctly track state of excluded CPU clusters Date: Tue, 11 Aug 2026 11:20:00 +0530 Message-Id: <20260811-domain_off_ss3-v1-0-6a0a0fc023f5@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=H4sIAAi4emoC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIzMDC0ND3ZT83MTMvPj8tLT44mJj3eRUM1NDc8NkQxNDMyWgpoKi1LTMCrC B0bEQfnFpUlZqcgnIFKXaWgAd7Bs8cgAAAA== X-Change-ID: 20260811-domain_off_ss3-ce65171c1416 To: Ulf Hansson , "Rafael J. Wysocki" , Daniel Lezcano , Christian Loehle , Sudeep Holla , "Rafael J. Wysocki" , Dmitry Osipenko Cc: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Maulik Shah X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1786427414; l=2479; i=maulik.shah@oss.qualcomm.com; s=20240109; h=from:subject:message-id; bh=YxRmzsXwL69qEXZhxMu1pjQ0toXga7vJW3wqY1JbwA8=; b=9ZpJsh5hzZn3fUVFYXRZSERpLh4cMMRBFjL4WlJuVSsfwTk6lKhZFtRrDgvrTe/CEzzVvYLdW z3jyM5yNswhCeEgvyVIM7qj0PgYMJB4uTzzNHqEBrDgY+FomgR2ZDh5 X-Developer-Key: i=maulik.shah@oss.qualcomm.com; a=ed25519; pk=bd9h5FIIliUddIk8p3BlQWBlzKEQ/YW5V+fe759hTWQ= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODExMDA0NiBTY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W3gUjOHCQ97IzCDZgCp4e-2C 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_06,2026-08-10_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 phishscore=0 lowpriorityscore=0 impostorscore=0 malwarescore=0 priorityscore=1501 suspectscore=0 spamscore=0 bulkscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608110046 When CPUs in a cluster are excluded at boot (e.g. via maxcpus=N), their CPU-cluster genpd is never really powered off, and its reported idle-state index never reflects the deepest state either. Both issues independently prevent the parent domain from ever powering off, even though the excluded clusters never ran any CPU. Patch 1 addresses the domain status: psci_pd_init() always calls pm_genpd_init() with is_off=false, so a CPU-cluster genpd is marked ON at creation regardless of whether any CPU in it has actually powered it on. For clusters whose CPUs never come online, nothing ever transitions the domain to OFF afterwards, so it is stuck reporting ON forever. This patch starts the domain OFF at creation when OSI is in use, since dt_idle_attach_cpu() and the cpuhp callbacks already power it on correctly for any CPU that is or becomes online. Patch 2 addresses the idle-state index for domains that start OFF: even after patch 1, a domain that starts OFF without ever going through an actual power-off sequence is left with state_idx=0 (its kzalloc'd value), i.e. reported as parked at its shallowest idle state instead of its deepest one. genpd_power_off()/genpd_sync_power_off() gate parent power-off on every child being at its deepest state index, so these domains still block the parent from powering off, even though they are genuinely off. This patch sets state_idx to the deepest state whenever a domain is initialised OFF, addressing the root cause for every is_off=true caller of pm_genpd_init(), not just PSCI CPU clusters. Together, these two patches let the parent domain power off normally on systems such as hamoa when booted with maxcpus=N, allowing the deepest system-level low-power mode (SS3) to be entered. The two patches address independent gaps and have no hard dependency on each other; either can be merged on its own or in either order. Signed-off-by: Maulik Shah --- Maulik Shah (2): cpuidle: psci: Start CPU-cluster pmdomain OFF when OSI is used pmdomain: core: Initialize state_idx to deepest state for OFF domains drivers/cpuidle/cpuidle-psci-domain.c | 14 +++++++++++++- drivers/pmdomain/core.c | 2 ++ 2 files changed, 15 insertions(+), 1 deletion(-) --- base-commit: 6b8c8af514d739d0335f5579b585e02babe8a727 change-id: 20260811-domain_off_ss3-ce65171c1416 Best regards, -- Maulik Shah