Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2107343lqb; Mon, 27 May 2024 08:05:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUPLiMGbyNj3LMDg14sAHWIQUykKb+yHnAH8Difpy3V+7tz1C/CWuNPYNohIxjC9idgTM8jR6UHbhxHzkCFU+7z2NI9QHOMdJMHSX3Hyw== X-Google-Smtp-Source: AGHT+IGAPEB+Fma7o2zd7CHsGxZM8n2a4kh1zH+6r6XiXz5msA+JQSNopJRDMDwjVuCz1/LlR6I5 X-Received: by 2002:a17:90a:c698:b0:2bf:82ad:6b26 with SMTP id 98e67ed59e1d1-2bf82ad6f48mr9588409a91.17.1716822350163; Mon, 27 May 2024 08:05:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716822350; cv=pass; d=google.com; s=arc-20160816; b=ALT/3goNDr2puBedZI+FHLDm1uQGf29eKOflbdbzy+q0yMdMQ0gghCeLHUDkp/SEfn 7UvPCcLiHADTj7WEtRREL1PDt6AvXwo2Cd4eJqfTrEdqeA0Q4FUn+N3RFeWV6W+dYyLR JTPtDUbtZOJ1aZiZE7TQrsIxJbCShSHxQyknCfHq2UCS39tmS/dpfQFnbe3z0QZx/k0D mTe50EMqxrvAtyhEKgUtFI1JioBfBYPn86oZPzIjDeLmhTj68VD14gjKCXYB1z9OweAu yq0lOILLp2laf5y5DNQOtCT3hPjKnHvO/2cRrkAVGE5+E9w4O9iPqmkJtVucKv7UJLsB bRSw== 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=X4/aOzZ0hsg6Et5+0deJCRjrlcbs+6p+P8Nfmbgr0Wg=; fh=qZWqewaRv01W0sUShrTU8xXDWvMRM+gU/FaJJvqK1jw=; b=axcdF4rY5bspjdfGhIobZgKCMSxoyry6mznudWZDcWvx5QtDvA4ULCFdBsAXd+jwEt LmrAbtK//reCcuiYLzk4eZHrhAQ1MIjhRJtSqJC3GFyjkEMdbHiSKz++4T5R2b4UR7x7 1l17Qun443qXrKX/dIN/JbyPI2zVj60yX21bIVrWm+LrvWSpKVdDF6QBKT8YFb/Rtypw II0GEqzfVsKNyPgAO5zeZRHKC17ZH7pJPS8UK23vKr8hRhSOIBwspBf+MqLtgNfE5UZq Do/kbz+fG39cz0ethygAMQhxj6MGHclpu85zKRSYjG0N5eYvfbn8reWqymHrWHVPvLGS mFJw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gtRw8EjA; 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-190958-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190958-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2bdef706764si7601859a91.140.2024.05.27.08.05.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 08:05:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-190958-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gtRw8EjA; 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-190958-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190958-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id B3BBB29365A for ; Mon, 27 May 2024 14:56:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A226F16FF47; Mon, 27 May 2024 14:26:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="gtRw8EjA" Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) (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 A7C8815F30F for ; Mon, 27 May 2024 14:26:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716819974; cv=none; b=VLjVE9Cn72nkB0ipG5yuv3DuNoCwrpLRDrl0wpONeJ5ruyXN9rpP/ioayR+XPjd+WU/0EmKZNBk+dei1PsmCx8+R9lGFPtd5g6vLSI+J86aM0g4R2EHmKbx4J6qUxHWP2bt0Vo05eLOqb3bqApC65m6yZnNFI0ay+6Mte8Iag5o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716819974; c=relaxed/simple; bh=6jcDQSRGQriKta5hxhLanAzBNZ/Jw6OPpaAHgN7aCBw=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=WvcQHZosm4CzJenuTLq1oqVui5ax23czicqKetx2FEE5MFF54XUqEOupdneY1/aVgx/YksZiUQECkDikuk/KNURsagbQHeaFdYetorKkextMoFClvgsOuimLkT8KYOIhpm7AQj/v8sU99LhicyY8cqiXxWCRTzok4JkZpsZVuXc= 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=gtRw8EjA; arc=none smtp.client-ip=209.85.167.51 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-lf1-f51.google.com with SMTP id 2adb3069b0e04-5296232e00bso3500294e87.3 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=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=X4/aOzZ0hsg6Et5+0deJCRjrlcbs+6p+P8Nfmbgr0Wg=; b=gtRw8EjAt5T/bRgN18LNqeQyURmvswT2q0HodrTvY2VWqxtHUbIPiBgGCY5XVu3e1b HfP1mW5EovML0K4Cah0WGitWs531Xr69eCzCrgUw0p74R11Jb96w1SE7UMQO1Wq6aG3j 8dDJTEmRxQEwN1kCeOfDolwwWN5NQ13bEBASjNnLkVS5HJsDl3LT/zPg+TZZDLI21EQR sNFsMJRaOMndgqPc2WMsMeFvKjluJgakP946ZjJJ8jsMWSwclBju2AZQSUGjcMSC0M2z +intT+qaXtMk8H1HO3yf1YASVW+sgEJirAiYAfYdAL4orsYInz5JZIwRH4TOnQVroJHr nJ5w== 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=kIzOVEVCdutdRgfHjunwmh6JI8OalDeGUkyn9xNohZfDzIJAnAjERh9w7AnMa3mWYj X8GbyT3hd/r4jIoxCP+/rlR7hVlQV6XMSzr4bwgCfjKa33///jRU10OxfZqexF36+Ycz 8TvNjKtk9vYLKgtKo4z2NR1XjLfoQcHvRdVryzRgjmDEZnnqZjdwu5Kj8wb+8Gsiieac NA2EqTWubBa+QxDYwOMmO1SoE/gpULKuToHXBMD8+F1oP+yCGwtCmajA4KUD0Bjz2/9T JGEwXlPPC3DJSJaUyEdrgg6RV6X93L9eQPK7A6qOz94pTz+vIPNwmcz5MQ8ZnLG8b/sC HDNg== X-Forwarded-Encrypted: i=1; AJvYcCWDzQX3oGCQjuDFWLDAfyd2YL8ILO3WMsOwKmyAkiYg6IXl5oHuuWpY9bgKs/T+ervSUGJHh4gm6QdD8hSU4j8ed3BDuPwSl/RXLpZG X-Gm-Message-State: AOJu0Yzc5XDu7Z/nWMLCcwrW3LfiWUMBRf+WbChmVB6OjP2u8AcWYhBK rXG+NTK8EqC23a24bZsqfxFeXRSM0njGCyd4VaGNfLTKl3JTfMrFHZ0MzIiOBsE= 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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(-) -- 2.34.1