Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1380135lqa; Mon, 29 Apr 2024 07:06:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWRWMciRtiDL3kcGkncDnSicAXGWexKBBGBH8h6WRg5MJ9229Tw/U34vDvulReqysSrUNwNvzoPyPu/MlYbXq2zIa22cShoDZj/R8BWrg== X-Google-Smtp-Source: AGHT+IE+gWptWMKP5DDiTkzphXt3eOb8T0V3VpTfTAoTiulhLi6dbTAHmo/PV0CkQpfi3SslYOgR X-Received: by 2002:a17:906:b349:b0:a55:6f69:a939 with SMTP id cd9-20020a170906b34900b00a556f69a939mr9178025ejb.41.1714399571004; Mon, 29 Apr 2024 07:06:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714399570; cv=pass; d=google.com; s=arc-20160816; b=yv4YLi7PXCJZ5+4gdRV76QIreGXf1eLj9vDSdhARw7tIvt8gGFe+57nBn19EApWpg/ oOwjl/l1jBTmDGWtFjv+Crv8+AsJReJ7MdKT/2AjjRpcECHZ1a1K85VwmdcPPxF1g22S sC6EtaTIcHlVnNO7wO5TZuqtYJhGkcbnl6GLFt+QTK/fRvMkBWSJTKDJqF7rxH+4J420 YUnse7fqo8zJKRxbHB4qCayBV/8KCDD9k3COC1rc66hOgRPa3qQXRL3+Tey7PCu4sQDd 3BceJxw+KvoTBvt7ZW5WlUm2ldEUEojQNPggeBep8vHXSu0eniF7235KucqdQk41FgIF 00EA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=xXJMGZU5gWJajF1DAzW8nc/IcTR1txmF3L1/3ROYhek=; fh=fFE2K6mva3FzBjNFFZZB+50ElkiV1J6wn1gecop7Yaw=; b=eQnFiHpd/mTM2DUW9JqxYOkwOx98np+bSvCGao50w/20aOXGUsQPtotCDxP/fNYU9y jD45x8lnkzwqHLDSDsVg1K4v5nk3htSEByKPCFdyj0xvohG1alEpRJ0OeFMzbbhfOPv0 TUYSlHJwwqZ23qoJsqeqnplG23GMCWHrWmfGQSJtbeIN29Yvzyj2JIABVay68tjw30XI J6yLKb+BHR4KzTNaS4HV7BmScW+yhW916d/pUc+Wk50gpyUPXVB4CRAKHT0cwk2S7YvM zVgjKyPVPTIYRc3V8M0HEfJsJfmTFhbNG0tSeXnq8WSq+iYO6xfzqkuzdpZGcVPZhrGk o40Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D5Itbw1P; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-162416-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162416-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id jr8-20020a170906a98800b00a525b0d2754si14314795ejb.960.2024.04.29.07.06.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 07:06:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-162416-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D5Itbw1P; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-162416-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162416-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 8026C1F21A7F for ; Mon, 29 Apr 2024 14:06:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 17A8578B63; Mon, 29 Apr 2024 14:05:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="D5Itbw1P" Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E77F762DA for ; Mon, 29 Apr 2024 14:05:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714399556; cv=none; b=ZE3OezdsphSsjgCKDrL3YykEhDSOvqr88usKV5vJk0BPn4+pNH+bOh/0d4gy8hf6v0Jwy2w+GUHqxESvUoj3goew1n8cs1OMZm8uf9jHO/mBnY1znmtIy5c7FJ+8Agk+QiYNatk8vng3pGR25ifc1f5CRcNx9KWyaPVvFeaUX+A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714399556; c=relaxed/simple; bh=Uf9ddhEBMCM/OlaEb7CTzNoTY6fpHPR3X42S1b/KeT4=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=sKETqlJHIiO5fAuN4TB5kJMpBz2jDeTQX2gUcGLsMTA3snukAEBFo2+ZBO5EoQ931hVIlbExmx9EcmVeU2O+kwvdivYSI9nEGirFLaIMEfr1VDBCNBTlg3RLGIDzO5qRoOS4/ihEuLoFfYeb33ClNBEsueUNDAquFx85YTXTm6U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=D5Itbw1P; arc=none smtp.client-ip=209.85.208.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lj1-f180.google.com with SMTP id 38308e7fff4ca-2df9af57b5eso34012301fa.2 for ; Mon, 29 Apr 2024 07:05:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714399551; x=1715004351; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=xXJMGZU5gWJajF1DAzW8nc/IcTR1txmF3L1/3ROYhek=; b=D5Itbw1P1NBmUpFO10twp0nncx6lGHp36H83ra6rvujpSaPPDKnRhxdAts5LwIMMYr SuPBDb97ici9jxQfwgrrqBCXtMpCH+sQQjr6ghCO/NTTlpHB3vtFo8c98Iu13oid4iH8 94N/17OLYNSLQCYPUGDZO4EkmdQXb9ZNrDgprLQhLzbacgkAIxURc8iLSqmvIdp+OHCZ Rh3PD+E3XG6wevU51XUQZ+lLoPDS447axOw81uHXSZt4zH8Kh8N67OuCk31FxyR/Ue9+ H60kN2QdrYyXij+N8pm6VDf9JkPtQD9CunuV1m2P0Ij9RQf4GA6ES9O3Zi85+vEaWg0h aNMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714399551; x=1715004351; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xXJMGZU5gWJajF1DAzW8nc/IcTR1txmF3L1/3ROYhek=; b=iCJC7iTAGdkD9oukmI3sS6svs3dTFmRVkkWIIL3nWyqRVNH1dXfKz1vHeMUXN/xeLr pb/3Uc6Bv14aQi8BWWTHtr1wL6ooFZ32xUosXLXfg963vpxJgfyS3zEeQXlbv62gpVat am2Up5Zme3a6VNlHG67cZsA0vM+KeL9dsxZjahPnMA9buM7L/GMk3+C60k0dArRcem+Z xacO5bi327HLBRlEthptYDA1Jc4D79y4pFjB6G26/sB6Wpi0yKsSuAeiX+zvhCahtKAo bmcpJM99pt+Luk7o1CeYviu6uX4nLDSWYd9yhPzv1QBOKCLr8WJvo2S/2YH51+hNRhKc fz+g== X-Forwarded-Encrypted: i=1; AJvYcCX5FBiNLPcdzcza2DKtuhJG9QDZbgQtHgfnDpjPiR8nogMiFf0CHTqzePJnunVsqmVGjPLlJHec8oYN7nh5rSVpPqX2Q070CTkSY7EE X-Gm-Message-State: AOJu0YwWPdNSXy21Ruar5risz8QWvXCfBn7smdztKoB2xcSrnD68HPrv YvfSyd64TZdHbMgIZ0HmM3m0hx6LUlXH1GME80EgY93NWAp7/ZFEBtHZA2iMibw= X-Received: by 2002:a05:651c:2107:b0:2df:dea1:5378 with SMTP id a7-20020a05651c210700b002dfdea15378mr6030267ljq.16.1714399551361; Mon, 29 Apr 2024 07:05:51 -0700 (PDT) Received: from uffe-tuxpro14.. (h-178-174-189-39.A498.priv.bahnhof.se. [178.174.189.39]) by smtp.gmail.com with ESMTPSA id l5-20020a2e9085000000b002d7095bf808sm3636733ljg.128.2024.04.29.07.05.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 07:05:50 -0700 (PDT) From: Ulf Hansson To: "Rafael J . Wysocki" , Sudeep Holla , linux-pm@vger.kernel.org Cc: Lorenzo Pieralisi , Nikunj Kela , Prasad Sodagudi , Maulik Shah , Daniel Lezcano , Krzysztof Kozlowski , Ulf Hansson , linux-rt-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/6] pmdomain/cpuidle-psci: Support s2idle/s2ram on PREEMPT_RT Date: Mon, 29 Apr 2024 16:05:25 +0200 Message-Id: <20240429140531.210576-1-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The hierarchical PM domain topology and the corresponding domain-idle-states are currently disabled on a PREEMPT_RT based configuration. The main reason is because spinlocks are turned into sleepable locks on PREEMPT_RT, which means genpd and runtime PM can't be use in the atomic idle-path when selecting/entering an idle-state. For s2idle/s2ram this is an unnecessary limitation that this series intends to address. Note that, the support for cpuhotplug is left to future improvements. More information about this are available in the commit messages. I have tested this on a Dragonboard 410c. Kind regards Ulf Hansson Ulf Hansson (6): pmdomain: core: Enable s2idle for CPU PM domains on PREEMPT_RT pmdomain: core: Don't hold the genpd-lock when calling dev_pm_domain_set() cpuidle: psci-domain: Enable system-wide suspend on PREEMPT_RT cpuidle: psci: Drop redundant assignment of CPUIDLE_FLAG_RCU_IDLE cpuidle: psci: Enable the hierarchical topology for s2ram on PREEMPT_RT cpuidle: psci: Enable the hierarchical topology for s2idle on PREEMPT_RT drivers/cpuidle/cpuidle-psci-domain.c | 10 ++++-- drivers/cpuidle/cpuidle-psci.c | 26 +++++++++----- drivers/pmdomain/core.c | 52 +++++++++++++++++++++++++-- include/linux/pm_domain.h | 5 ++- 4 files changed, 77 insertions(+), 16 deletions(-) -- 2.34.1