From patchwork Mon May 27 14:25:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 13675433 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A3122C25B74 for ; Mon, 27 May 2024 14:26:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=B7xACZNkVFfTEX/Nz8ug6lKhsBizwySIrAdVt6z09kE=; b=f48VwV9oogrQZS UuvbHJfAtJ3QbNU+q1r2GGh4IwYVChMdlD3ooQSCo+LmxFxTP0qcACkqJRElDI/xuKCPxKooCmcuL gk8cm/hmxAF46Pp7nLziUNQOJe5iG70CAOPUFr89ewpdzE9Yphe1l9/5kjY0EOxWkWD8IFhpSAcYh yYIm9LF1wQVAeYI15J3lg58nv8HooctPa3uWC2IEKOtMN01fhfG6npxxyhb/cYedRaUeu6ivpOjzV CtmScjj5E1x/nXfLTImrFnPJBo/29OD91Hkdd9wsVNUiZXheIw4/3ESLn9oGbu0KaxcwdPHofQQPo 305FeKquQk35Kf7fNu9w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sBbIk-0000000FM3G-2gW4; Mon, 27 May 2024 14:26:14 +0000 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sBbIh-0000000FM0k-13Yd for linux-arm-kernel@lists.infradead.org; Mon, 27 May 2024 14:26:12 +0000 Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-529aa4e988aso2026464e87.0 for ; Mon, 27 May 2024 07:26:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716819969; x=1717424769; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=X4/aOzZ0hsg6Et5+0deJCRjrlcbs+6p+P8Nfmbgr0Wg=; b=DBDZ/YJnBvOv1nEm1ZCwkWAjIAYi2BV1R6yBII/VqbLnBpzghj25EbfVaWrzQE4Q7A qalJu6+Wl3UAjh7dYAgFHpH+K8QnjosZtrhdc78+1xtfqTbOuG+/Tt+lzvCWzbElwt8/ NcDmBw+heGwj2kvTjeKHak4YrLCHt099StFq04VIC67iHn+vfPa34P2SPMgVRy67N2bf Ky4+bIbs3bTyTbzSuuqyLSR+5eu18LGEo0AcYAK3wHSH/OR8J3JuZ6QlgkeLG9QXwKR2 gXuZdSHKM/MYlO4ggmtruuJiVHy6IJrK4R7ZKzXyjfTUkN4/cNDUkaTKwiwW17vAwOGG aPYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716819969; x=1717424769; 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=X4/aOzZ0hsg6Et5+0deJCRjrlcbs+6p+P8Nfmbgr0Wg=; b=H75w/DVZoaox3rRC6JzXG+odPBmBHC83eihnlfPfssoRcvYTGrDvcoc07p1cIUjviP iAedURE/HO2Yv4RL70Z4QpAwZd/RlgLWbqpjg4c8lO1ivEyC5vp8UMhWwAAy5PdaX46N W4hndWD3o0DgpJNq9rN5HITKadE5HvwhyId2NicP8d9ZORn6UC3vXFjEPfHUd3JqViTr EWUgM6x4k1QTU4MnWkTD6cHX+wYhf6Q6e93TMeHVlzkI0r6UiN64bPC0O6QWphwwDbiM wDcqoABjHdWLvVwAYsMmGDKG+SlLZg3ftSGh5qx8XrjKAc0OuWUsU7/hiYGFJsHo1qHj PzQg== X-Forwarded-Encrypted: i=1; AJvYcCUexqfck5NBu4v4gIyhIrwiJUiEhg9V3mB+tEckZsR0Q3+EJ/A/vJuP6eMiXDgjJfQLxBV2bxgiq7G8mCwuagbQtNUFPr7Km5kmLnKuHuFgxYRWCB8= X-Gm-Message-State: AOJu0Yy5F7Dnno+RJKtEp0WPhdulC6aTHObUGHQzoIaztdNsFaX34skz vsUBHnWK7R92x75qerPuNB9t11j8CiP6OQzYQf4Q/j+2UHH4Wrs4yp9GZ/6mj9E= X-Google-Smtp-Source: AGHT+IH+Repiz1mD7Jsz8/a6LNVzHuU42Y7XwFI26a4ECpBnmSdsIFpuHAnpFl7oDQPNA9Ib/KtAhg== X-Received: by 2002:a05:6512:3994:b0:522:2a2c:759e with SMTP id 2adb3069b0e04-5296420479emr6995769e87.6.1716819968484; Mon, 27 May 2024 07:26:08 -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 2adb3069b0e04-529711fa7f3sm562002e87.258.2024.05.27.07.26.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 07:26:07 -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 v2 0/7] pmdomain/cpuidle-psci: Support s2idle/s2ram on PREEMPT_RT Date: Mon, 27 May 2024 16:25:50 +0200 Message-Id: <20240527142557.321610-1-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240527_072611_320918_7F5E7293 X-CRM114-Status: GOOD ( 13.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Updates in v2: - Rebased and fixed a small issue in genpd, see patch3. - Re-tested on v6.9-rt5 (PREEMPT_RT enabled) - Re-tested on v6.10-rc1 (for regressions, PREEMPT_RT disabled) 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 (7): 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() pmdomain: core: Use dev_name() instead of kobject_get_path() in debugfs 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 | 75 +++++++++++++++++++-------- include/linux/pm_domain.h | 5 +- 4 files changed, 80 insertions(+), 36 deletions(-) Tested-by: Raghavendra Kakarla # qcm6490