From patchwork Mon Apr 29 14:05:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 13647033 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 AA7CAC4345F for ; Mon, 29 Apr 2024 14:06:12 +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=Xmw3ZIEcpjnehQAYtc+HeIKgQ9xBdz7js+fdsfCN9LQ=; b=l6zE/488b/M5Ae KjqgQhRniWJgcsG55nSBdnuzVY4wU+JFqyTVdgAiyn5j7/uEv90gOMhX334CIQOoFe5B0QpidxoAk U9EBMl14DUnFg/aZm6AkTtoLWxxZXhw6Yxup0YAYsyrXFj8Uriq3snKB9cKlMF68QVBHqHmALezFh aIosGj30zuDsVUX9+wZ+byk+RrzMt7Iw7x5MR3FvC0Ie29gVzYpwdQtgOQeJZukIDWQcKPn7nrJnE p3+OQljkhnGbbiD/sV0k74seenBi84IqP01ZaaFT4sRfuMcs1qusIme41dcpqQ57qzDtTYCGLVbot TwpDytnUTRC7RAQ+GzPA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1Rdl-000000033LI-1IXs; Mon, 29 Apr 2024 14:05:57 +0000 Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1Rdi-000000033KS-3P4l for linux-arm-kernel@lists.infradead.org; Mon, 29 Apr 2024 14:05:56 +0000 Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2e0a34b2899so9110621fa.3 for ; Mon, 29 Apr 2024 07:05:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714399551; x=1715004351; 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=xXJMGZU5gWJajF1DAzW8nc/IcTR1txmF3L1/3ROYhek=; b=jQj/s5t2d/LR89HNm3BC2vZbR/ziA1BSoa0Sl2a6UzRvBO5+AyCw5/DGCdSdu6UITC /1c/493RcR0l8tRQqHZSDHkeN9w6pNTCP9Ssdh+3/wKVY9G4P5Ak1BjfJneSqadzA2qc Rwq3NcI6WUG+nkYJdtmu9HSim4hN1bgv88mn4y51MER9ryGf1wY7DUCdlad7coBajMY/ cMpf8WGdXrKXTXwscJ2PBE6vmzKC/aGSkeMPbO1AJd4JBrbV8xkM2HD/jPJgZ35TDjrP 3fUdwW+55lqaLoLq00bAO15K6XT4Lh6pgvMG/cK9m+c3UlcMY/+9bCmfycAErVAV5FpX egUA== 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=BL6Aui+I9VTHx8Vkq8JjFi9TQwFYrlrMDVqOqLdV1rIiNZlYGb9msG8T6KiaVRniwW ZMP1KyzoQvug2KqU+tPt9r88aOI8weoyTZnFolE0g902/qnErp6DB7k4FIUZ/HDi/e2k dTmKRNbSg/QS4RAUSc6kgy+fkbAxVUfBHQ3ifNnk3JFyK35ZnOoh2FqAlWyCqZpGZ0a3 WK7oCjqyAIVxSabsdkkrYfpwf+JuDHy0+iifRrumYFEd74d/OZwczxZ43OSDWmQKDqf0 YJUR9m45y4htV4H21ih5BMMlyMrTwyRKsWWBxCRbjonnneJqUZiigUvrcF0kwcLs5vzE Fyyg== X-Forwarded-Encrypted: i=1; AJvYcCVf1829YwQcVYkfc1uTYrr6s3k7BsOyaVv2+ycey3Sd+7aXb5y9bbDmI/trCHHHY4zGZZJc5VB/aj3JbV221BOfd69VGLRn4JX3lCUkn9J1NytCQCI= X-Gm-Message-State: AOJu0YzLJCoLTMk9akRiKUQx2FgE8G7wT0YtOjQ5q9W6JgIAbVLT2nE6 HPW5lYDh1LiIV2YBOefrUXmaY1kVW6+RnWyLsxsoxfGsMjtxUnK42jjc2G1+r84= X-Google-Smtp-Source: AGHT+IFUjAW34oQS8Y+fnyeVdUbDkDis1iigpkrMI5QToMUOQcc8rZfl2WurAe5k4jfFMqtb5cerlQ== 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 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240429_070554_879847_B31FC714 X-CRM114-Status: GOOD ( 11.10 ) 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 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(-)