From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 139CDC55178 for ; Tue, 3 Nov 2020 15:07:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BAFFD223C7 for ; Tue, 3 Nov 2020 15:07:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ysK/IoiT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728258AbgKCPHk (ORCPT ); Tue, 3 Nov 2020 10:07:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728168AbgKCPGp (ORCPT ); Tue, 3 Nov 2020 10:06:45 -0500 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F57BC0613D1 for ; Tue, 3 Nov 2020 07:06:44 -0800 (PST) Received: by mail-lf1-x142.google.com with SMTP id y184so20647050lfa.12 for ; Tue, 03 Nov 2020 07:06:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=z2aikAnlU4Rv0xJ54ndQnr8H+vElIy0SKy9Omrer1Ow=; b=ysK/IoiTp/UV3EPWH4UVFRHclwAjajJUvSrrM3LNcbaoGkicwm6doZuxeL3S7sfb32 DMFErTSnQPcB0MgRCAtgupil1fcRLbb/LpGIBHCMUfHOsWw9qzbQxWIGEC67sBhHFAer PDJ9z0Fcss7tqgwKKqbQgOpcdfRU+m6wbJZbaEljBcMhGeiN0O0pERIMF+E2xxDGATeT JrjkX3Cju0HiFYns0PYd1VSMF6Yu9XGNMtlesWDovCfEjuzW3UrVQ+KcbZum6o7hIvFq b27ldA7bQuHFTP0JoBqJcNNJM4rZpxEIgYrP2VCwickkqKCeq7rQvpP4TzbYkbbO2MjF aJog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=z2aikAnlU4Rv0xJ54ndQnr8H+vElIy0SKy9Omrer1Ow=; b=eaQll137Ms13dinr02b6jazIzFUtx/J3KO32d7JgxpkimCkmyu8rQjQ+VQoJgCCbes Kdqzt9YNzrOaXfd0zIz4/kHIo80kyPnew7C54Uxx86w3uA3oQKyIbTtp00SNnZCIrKIJ FjlHVUjdTzAB/0GQcofDgMQ/ESzbMw7vS+j92kQw1KzLWC+6oY8DkAx+DVCgcPC5rLz9 Pmg8O8uUgV1rH/NUatufLVgyveQjWhs+7hT3yfPqY7oycjId5bBbW7mLlmXD6debk/3d sF+fAqOTG66z86yF+D3Xw7ifng4AuHkPOiLKjD23rMsGriHSHGIq2tVPQwc4oRXLmbzV PUNQ== X-Gm-Message-State: AOAM5318Peh5fFP8w2eVe3YspLFSIo8iQghFZnJulfF8O0iLKSJ4lzM/ a61nX9N5f7EOjGePqtoeteZKrQ== X-Google-Smtp-Source: ABdhPJzaNwaa4JfoulcPt1J10kPgf3A10Pfy/kvKPYlSj4ezifUxRuTpYUt3gCD3A1Gn05zKdnj4Gw== X-Received: by 2002:a19:ca4b:: with SMTP id h11mr8466061lfj.6.1604416002518; Tue, 03 Nov 2020 07:06:42 -0800 (PST) Received: from localhost.localdomain (h-155-4-131-134.NA.cust.bahnhof.se. [155.4.131.134]) by smtp.gmail.com with ESMTPSA id a25sm3522169lfo.141.2020.11.03.07.06.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2020 07:06:41 -0800 (PST) From: Ulf Hansson To: "Rafael J . Wysocki" , Sudeep Holla , Lorenzo Pieralisi , linux-pm@vger.kernel.org Cc: Daniel Lezcano , Lina Iyer , Lukasz Luba , Vincent Guittot , Stephen Boyd , Bjorn Andersson , Alexandre Torgue , Ulf Hansson , linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 3/3] cpuidle: psci: Enable suspend-to-idle for PSCI OSI mode Date: Tue, 3 Nov 2020 16:06:27 +0100 Message-Id: <20201103150627.233438-4-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201103150627.233438-1-ulf.hansson@linaro.org> References: <20201103150627.233438-1-ulf.hansson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org To select domain idlestates for cpuidle-psci when OSI mode has been enabled, the PM domains via genpd are being managed through runtime PM. This works fine for the regular idlepath, but it doesn't during system wide suspend. More precisely, the domain idlestates becomes temporarily disabled, which is because the PM core disables runtime PM for devices during system wide suspend. Later in the system suspend phase, genpd intends to deal with this from its ->suspend_noirq() callback, but this doesn't work as expected for a device corresponding to a CPU, because the domain idlestates needs to be selected on a per CPU basis (the PM core doesn't invoke the callbacks like that). To address this problem, let's enable the syscore flag for the corresponding CPU device that becomes successfully attached to its PM domain (applicable only in OSI mode). This informs the PM core to skip invoke the system wide suspend/resume callbacks for the device, thus also prevents genpd from screwing up its internal state of it. Moreover, to properly select a domain idlestate for the CPUs during suspend-to-idle, let's assign a specific ->enter_s2idle() callback for the corresponding domain idlestate (applicable only in OSI mode). From that callback, let's invoke dev_pm_genpd_suspend|resume(), as this allows a domain idlestate to be selected for the current CPU by genpd. Signed-off-by: Ulf Hansson --- Changes in v2: - Rebased upon recent changes. - Updated the commit message. --- drivers/cpuidle/cpuidle-psci-domain.c | 2 ++ drivers/cpuidle/cpuidle-psci.c | 34 +++++++++++++++++++++++---- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/drivers/cpuidle/cpuidle-psci-domain.c b/drivers/cpuidle/cpuidle-psci-domain.c index 4a031c62f92a..ff2c3f8e4668 100644 --- a/drivers/cpuidle/cpuidle-psci-domain.c +++ b/drivers/cpuidle/cpuidle-psci-domain.c @@ -327,6 +327,8 @@ struct device *psci_dt_attach_cpu(int cpu) if (cpu_online(cpu)) pm_runtime_get_sync(dev); + dev_pm_syscore_device(dev, true); + return dev; } diff --git a/drivers/cpuidle/cpuidle-psci.c b/drivers/cpuidle/cpuidle-psci.c index d928b37718bd..b51b5df08450 100644 --- a/drivers/cpuidle/cpuidle-psci.c +++ b/drivers/cpuidle/cpuidle-psci.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -52,8 +53,9 @@ static inline int psci_enter_state(int idx, u32 state) return CPU_PM_CPU_IDLE_ENTER_PARAM(psci_cpu_suspend_enter, idx, state); } -static int psci_enter_domain_idle_state(struct cpuidle_device *dev, - struct cpuidle_driver *drv, int idx) +static int __psci_enter_domain_idle_state(struct cpuidle_device *dev, + struct cpuidle_driver *drv, int idx, + bool s2idle) { struct psci_cpuidle_data *data = this_cpu_ptr(&psci_cpuidle_data); u32 *states = data->psci_states; @@ -66,7 +68,12 @@ static int psci_enter_domain_idle_state(struct cpuidle_device *dev, return -1; /* Do runtime PM to manage a hierarchical CPU toplogy. */ - RCU_NONIDLE(pm_runtime_put_sync_suspend(pd_dev)); + rcu_irq_enter_irqson(); + if (s2idle) + dev_pm_genpd_suspend(pd_dev); + else + pm_runtime_put_sync_suspend(pd_dev); + rcu_irq_exit_irqson(); state = psci_get_domain_state(); if (!state) @@ -74,7 +81,12 @@ static int psci_enter_domain_idle_state(struct cpuidle_device *dev, ret = psci_cpu_suspend_enter(state) ? -1 : idx; - RCU_NONIDLE(pm_runtime_get_sync(pd_dev)); + rcu_irq_enter_irqson(); + if (s2idle) + dev_pm_genpd_resume(pd_dev); + else + pm_runtime_get_sync(pd_dev); + rcu_irq_exit_irqson(); cpu_pm_exit(); @@ -83,6 +95,19 @@ static int psci_enter_domain_idle_state(struct cpuidle_device *dev, return ret; } +static int psci_enter_domain_idle_state(struct cpuidle_device *dev, + struct cpuidle_driver *drv, int idx) +{ + return __psci_enter_domain_idle_state(dev, drv, idx, false); +} + +static int psci_enter_s2idle_domain_idle_state(struct cpuidle_device *dev, + struct cpuidle_driver *drv, + int idx) +{ + return __psci_enter_domain_idle_state(dev, drv, idx, true); +} + static int psci_idle_cpuhp_up(unsigned int cpu) { struct device *pd_dev = __this_cpu_read(psci_cpuidle_data.dev); @@ -170,6 +195,7 @@ static int psci_dt_cpu_init_topology(struct cpuidle_driver *drv, * deeper states. */ drv->states[state_count - 1].enter = psci_enter_domain_idle_state; + drv->states[state_count - 1].enter_s2idle = psci_enter_s2idle_domain_idle_state; psci_cpuidle_use_cpuhp = true; return 0; -- 2.25.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4003C2D0A3 for ; Tue, 3 Nov 2020 15:08:05 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5B0D3221FB for ; Tue, 3 Nov 2020 15:08:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="SlZ9G3rq"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ysK/IoiT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5B0D3221FB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=2ACwtyXjxErWYUH0N2Hq4oIj2zLQMgPxPncQP+L6HzE=; b=SlZ9G3rqhM0C8df+/P9rDEAhq SuBHHMqKpmaZXOLv23oNPwNVZKiKQWiLbuRUyB9s7mYwvHPtL7QZuchlRpUiZZM7XpkIUwD7ayPQT PY2U3A+3SMcXxLc/FI+DoWBZd5WCDD99XyOqiCC0pYh9gJ7BSG3tA/+qfi68pX13ADFdo/E6fBhpO RXl8KXLD4HyP3kPITMxkNYschO5SOMXuIp4w35aiKQIDN85SOADpNQSDxNqQJTvdbWSRjP1g9twRp QBuHnjlw6/6cajkW8t4vHqNDklWqE9z9pCn4bbdPq4FjeQL8j+IjQj1zFKdpvs4qVJvxiNK2kGG36 3QNCLmByQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kZxu1-0004Pb-SA; Tue, 03 Nov 2020 15:07:17 +0000 Received: from mail-lf1-x143.google.com ([2a00:1450:4864:20::143]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kZxtU-0004E9-Qy for linux-arm-kernel@lists.infradead.org; Tue, 03 Nov 2020 15:06:50 +0000 Received: by mail-lf1-x143.google.com with SMTP id s30so337807lfc.4 for ; Tue, 03 Nov 2020 07:06:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=z2aikAnlU4Rv0xJ54ndQnr8H+vElIy0SKy9Omrer1Ow=; b=ysK/IoiTp/UV3EPWH4UVFRHclwAjajJUvSrrM3LNcbaoGkicwm6doZuxeL3S7sfb32 DMFErTSnQPcB0MgRCAtgupil1fcRLbb/LpGIBHCMUfHOsWw9qzbQxWIGEC67sBhHFAer PDJ9z0Fcss7tqgwKKqbQgOpcdfRU+m6wbJZbaEljBcMhGeiN0O0pERIMF+E2xxDGATeT JrjkX3Cju0HiFYns0PYd1VSMF6Yu9XGNMtlesWDovCfEjuzW3UrVQ+KcbZum6o7hIvFq b27ldA7bQuHFTP0JoBqJcNNJM4rZpxEIgYrP2VCwickkqKCeq7rQvpP4TzbYkbbO2MjF aJog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=z2aikAnlU4Rv0xJ54ndQnr8H+vElIy0SKy9Omrer1Ow=; b=nWCVidKIvonnS5pVw7k/Fbk3nWvKnAxRIMjR6WOvjON7AIrYUY0bYodmFelyuzGT4n 7VnUhh/T3mwVRzkGMLXFVi0qzmpNrMxdpKaawFhJ5ln+JvlTSgWK1bjJNwPktUX/sPEV FP1GPfU5U6BwalmHi4DLOHnQV/lU7b98iWjwDs+vTHfaGtQgnuVgFS/oXr6Z0+vSLOk2 znL48UA68cNx3V5FR6vjSb7f2ufeAH5/pjqIR0UxiOEa1i7uNRQKF0KluMyWNzgG/SQS oWQnlZyQRqNpCdhavbZEyO5k/R2Yn/F9cQaEA1LMT/dmLz3mJlpro9HdGNUSnb0yc89f J6zQ== X-Gm-Message-State: AOAM532EGKih5uvAa6KI9wIAeQmg2e4A8JblrvPP0kvnupAIlkB0fHoZ 0idiBEMBgAdy2e1sD0VyWmiWOw== X-Google-Smtp-Source: ABdhPJzaNwaa4JfoulcPt1J10kPgf3A10Pfy/kvKPYlSj4ezifUxRuTpYUt3gCD3A1Gn05zKdnj4Gw== X-Received: by 2002:a19:ca4b:: with SMTP id h11mr8466061lfj.6.1604416002518; Tue, 03 Nov 2020 07:06:42 -0800 (PST) Received: from localhost.localdomain (h-155-4-131-134.NA.cust.bahnhof.se. [155.4.131.134]) by smtp.gmail.com with ESMTPSA id a25sm3522169lfo.141.2020.11.03.07.06.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2020 07:06:41 -0800 (PST) From: Ulf Hansson To: "Rafael J . Wysocki" , Sudeep Holla , Lorenzo Pieralisi , linux-pm@vger.kernel.org Subject: [PATCH v2 3/3] cpuidle: psci: Enable suspend-to-idle for PSCI OSI mode Date: Tue, 3 Nov 2020 16:06:27 +0100 Message-Id: <20201103150627.233438-4-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201103150627.233438-1-ulf.hansson@linaro.org> References: <20201103150627.233438-1-ulf.hansson@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201103_100648_598659_CC31422A X-CRM114-Status: GOOD ( 21.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ulf Hansson , Vincent Guittot , Alexandre Torgue , Stephen Boyd , Daniel Lezcano , Lina Iyer , Bjorn Andersson , linux-arm-kernel@lists.infradead.org, Lukasz Luba Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org To select domain idlestates for cpuidle-psci when OSI mode has been enabled, the PM domains via genpd are being managed through runtime PM. This works fine for the regular idlepath, but it doesn't during system wide suspend. More precisely, the domain idlestates becomes temporarily disabled, which is because the PM core disables runtime PM for devices during system wide suspend. Later in the system suspend phase, genpd intends to deal with this from its ->suspend_noirq() callback, but this doesn't work as expected for a device corresponding to a CPU, because the domain idlestates needs to be selected on a per CPU basis (the PM core doesn't invoke the callbacks like that). To address this problem, let's enable the syscore flag for the corresponding CPU device that becomes successfully attached to its PM domain (applicable only in OSI mode). This informs the PM core to skip invoke the system wide suspend/resume callbacks for the device, thus also prevents genpd from screwing up its internal state of it. Moreover, to properly select a domain idlestate for the CPUs during suspend-to-idle, let's assign a specific ->enter_s2idle() callback for the corresponding domain idlestate (applicable only in OSI mode). From that callback, let's invoke dev_pm_genpd_suspend|resume(), as this allows a domain idlestate to be selected for the current CPU by genpd. Signed-off-by: Ulf Hansson --- Changes in v2: - Rebased upon recent changes. - Updated the commit message. --- drivers/cpuidle/cpuidle-psci-domain.c | 2 ++ drivers/cpuidle/cpuidle-psci.c | 34 +++++++++++++++++++++++---- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/drivers/cpuidle/cpuidle-psci-domain.c b/drivers/cpuidle/cpuidle-psci-domain.c index 4a031c62f92a..ff2c3f8e4668 100644 --- a/drivers/cpuidle/cpuidle-psci-domain.c +++ b/drivers/cpuidle/cpuidle-psci-domain.c @@ -327,6 +327,8 @@ struct device *psci_dt_attach_cpu(int cpu) if (cpu_online(cpu)) pm_runtime_get_sync(dev); + dev_pm_syscore_device(dev, true); + return dev; } diff --git a/drivers/cpuidle/cpuidle-psci.c b/drivers/cpuidle/cpuidle-psci.c index d928b37718bd..b51b5df08450 100644 --- a/drivers/cpuidle/cpuidle-psci.c +++ b/drivers/cpuidle/cpuidle-psci.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -52,8 +53,9 @@ static inline int psci_enter_state(int idx, u32 state) return CPU_PM_CPU_IDLE_ENTER_PARAM(psci_cpu_suspend_enter, idx, state); } -static int psci_enter_domain_idle_state(struct cpuidle_device *dev, - struct cpuidle_driver *drv, int idx) +static int __psci_enter_domain_idle_state(struct cpuidle_device *dev, + struct cpuidle_driver *drv, int idx, + bool s2idle) { struct psci_cpuidle_data *data = this_cpu_ptr(&psci_cpuidle_data); u32 *states = data->psci_states; @@ -66,7 +68,12 @@ static int psci_enter_domain_idle_state(struct cpuidle_device *dev, return -1; /* Do runtime PM to manage a hierarchical CPU toplogy. */ - RCU_NONIDLE(pm_runtime_put_sync_suspend(pd_dev)); + rcu_irq_enter_irqson(); + if (s2idle) + dev_pm_genpd_suspend(pd_dev); + else + pm_runtime_put_sync_suspend(pd_dev); + rcu_irq_exit_irqson(); state = psci_get_domain_state(); if (!state) @@ -74,7 +81,12 @@ static int psci_enter_domain_idle_state(struct cpuidle_device *dev, ret = psci_cpu_suspend_enter(state) ? -1 : idx; - RCU_NONIDLE(pm_runtime_get_sync(pd_dev)); + rcu_irq_enter_irqson(); + if (s2idle) + dev_pm_genpd_resume(pd_dev); + else + pm_runtime_get_sync(pd_dev); + rcu_irq_exit_irqson(); cpu_pm_exit(); @@ -83,6 +95,19 @@ static int psci_enter_domain_idle_state(struct cpuidle_device *dev, return ret; } +static int psci_enter_domain_idle_state(struct cpuidle_device *dev, + struct cpuidle_driver *drv, int idx) +{ + return __psci_enter_domain_idle_state(dev, drv, idx, false); +} + +static int psci_enter_s2idle_domain_idle_state(struct cpuidle_device *dev, + struct cpuidle_driver *drv, + int idx) +{ + return __psci_enter_domain_idle_state(dev, drv, idx, true); +} + static int psci_idle_cpuhp_up(unsigned int cpu) { struct device *pd_dev = __this_cpu_read(psci_cpuidle_data.dev); @@ -170,6 +195,7 @@ static int psci_dt_cpu_init_topology(struct cpuidle_driver *drv, * deeper states. */ drv->states[state_count - 1].enter = psci_enter_domain_idle_state; + drv->states[state_count - 1].enter_s2idle = psci_enter_s2idle_domain_idle_state; psci_cpuidle_use_cpuhp = true; return 0; -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel