Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp4913374pxb; Tue, 28 Sep 2021 06:50:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7UY6S+vS9fYzZpcQxBImCYfegIpACd1fy5FCPaL8bO2tLAPqoZBgp7LpbAkRQniBh8eby X-Received: by 2002:a05:6402:222b:: with SMTP id cr11mr7824828edb.392.1632837044191; Tue, 28 Sep 2021 06:50:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632837044; cv=none; d=google.com; s=arc-20160816; b=wIo2Re9TMYBVSrFs3CEDvDnfMfrDcr7LTNnImU3eBNosVY+FObkkat/c2RSnqX68+L IOOHOi2YdM3yBl2xWJSpIjvo6Lqg4PGMVge4eUWPKe4oWK/Au/jiygoaRQtZd3lCJdDT emfW6BNJQxy6mDBddiHwxkEX3RxKrwTxvnXuoR/B381efSN2GKJkozlKzSiFLXaVg7Yl h5GEGhsdYaZZyIzxYCJMd75/Lc6ec9mI/Dvf/+HCysN3dDfBux1y527h70xDE7Ifv6aa gwpXuFTMSPwIo0k0Q9nOcYHO85UuceX/+0iMVx+vcqeGv6Lz4EjVG0kbdpauJtzghcIa cfLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=slx3O85aqI+xrzFUMIHut5cEmC7HL7MenqMDBKplWcQ=; b=haheqM0WMhTu1yjJIhTbebjTKH35VWySyRALA1+GE2lIbCJDCQaRRkgLUVDqmdVft1 ZlR5X5XoeallqXYCaMdVzN5oc2/mv+3FuUmg3SfMlvYvOf8COMxAYxCLnXJ1mp2IPUXB olFhKHPCdkGz2PQNo4IJyPlGfYcCeBWUSq7rg6a/TqAVsupiFQ1A/1NoMC9mAuEeYRy4 Xt1UCplGSGXdsr9XxvelZLUKs+ZdRcY71RK/qyZ0AlGRkM7oPB+GjB+fxvNap9IVp/fs OyobbjS9luhX6tjyPR5RNAejU29oVbqmAzCvpNxGVXAidNxnmcNjrAJn/pLHFUszIz+d zofA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x8si777236edd.417.2021.09.28.06.50.18; Tue, 28 Sep 2021 06:50:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240968AbhI1NuO convert rfc822-to-8bit (ORCPT + 99 others); Tue, 28 Sep 2021 09:50:14 -0400 Received: from mail-oo1-f50.google.com ([209.85.161.50]:46839 "EHLO mail-oo1-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240959AbhI1NuN (ORCPT ); Tue, 28 Sep 2021 09:50:13 -0400 Received: by mail-oo1-f50.google.com with SMTP id l8-20020a4ae2c8000000b002b5ec765d9fso306635oot.13; Tue, 28 Sep 2021 06:48:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=yI0t52vDjp3qPZNaDmO9lPl1ra/Vt/GghnssMztBk0k=; b=lAsmBK5QSPoAkC6EEEuOvJne1FQsxp4stJPhK7+pwTlHfZmemycTWDi4XDJMmebb6t oPb0DGQRXV2kIpMdQCwVl3gPPTXU7lYIt5sqDIRU2yGhGY0zkNH5l48+h3PIJyjLk3Rr ezwld6qSYFmAuddJgok/ujQwQZYY1MEMtHZjaie6O8DnVm3OxYfNLCA24ogcL8t12Ngv bQt6mm8UoTM6CEjoNowj/EDUA9X08zrIjY4QDw0fwqqylXbi7Chhpj9BeasrmTHf2Z0y 3yjZFiY0lgLgSrGzXaBw06JOsgSOwTC28VpsTu477CH1H2KtyfQM3q85DktSzUuoLrbS Me+A== X-Gm-Message-State: AOAM533+RQwnW0mqihWoDgTGJTUHAy04uUc9iNCH1iLesf5ZubyML9Ou c+OvrE0kselM3n3E4WSjTQkp8cNik/A0w/rTOY0= X-Received: by 2002:a4a:df0b:: with SMTP id i11mr4991937oou.30.1632836913969; Tue, 28 Sep 2021 06:48:33 -0700 (PDT) MIME-Version: 1.0 References: <20210922133116.102-1-richard.gong@amd.com> <3b26b179-69ba-64a2-807e-8d7609fbeb6e@amd.com> In-Reply-To: <3b26b179-69ba-64a2-807e-8d7609fbeb6e@amd.com> From: "Rafael J. Wysocki" Date: Tue, 28 Sep 2021 15:48:23 +0200 Message-ID: Subject: Re: [PATCHv1] ACPI: processor idle: Allow playing dead in C3 state To: "Gong, Richard" Cc: "Rafael J. Wysocki" , Len Brown , ACPI Devel Maling List , Linux Kernel Mailing List , lijo.lazar@amd.com, Mario Limonciello Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 28, 2021 at 3:00 PM Gong, Richard wrote: > > Hi Rafael, > > On 9/24/2021 11:31 AM, Rafael J. Wysocki wrote: > > On Wed, Sep 22, 2021 at 3:31 PM Richard Gong wrote: > >> When some cores are disabled on AMD platforms, the system will no longer > >> be able to enter suspend-to-idle s0ix. > >> > >> Update to allow playing dead in C3 state so that the CPUs can enter the > >> deepest state on AMD platforms. > >> > >> BugLink: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Famd%2F-%2Fissues%2F1708&data=04%7C01%7Crichard.gong%40amd.com%7Ca5c0db9ce02b4cd0864f08d97f78d33f%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637680980065602427%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=dIO5PDjpncLFIt0aGaTrKJHYIkJm8A4YByGn1%2FsHrtM%3D&reserved=0 > >> Suggested-by: Mario Limonciello > >> Signed-off-by: Richard Gong > >> --- > >> drivers/acpi/processor_idle.c | 3 ++- > >> 1 file changed, 2 insertions(+), 1 deletion(-) > >> > >> diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c > >> index f37fba9e5ba0..61d5a72d218e 100644 > >> --- a/drivers/acpi/processor_idle.c > >> +++ b/drivers/acpi/processor_idle.c > >> @@ -789,7 +789,8 @@ static int acpi_processor_setup_cstates(struct acpi_processor *pr) > >> state->enter = acpi_idle_enter; > >> > >> state->flags = 0; > >> - if (cx->type == ACPI_STATE_C1 || cx->type == ACPI_STATE_C2) { > >> + if (cx->type == ACPI_STATE_C1 || cx->type == ACPI_STATE_C2 > >> + || cx->type == ACPI_STATE_C3) { > >> state->enter_dead = acpi_idle_play_dead; > >> drv->safe_state_index = count; > >> } > >> -- > > Tentatively applied as 5.16 material, but have you done any research > > on why this restriction has been there in the first place? > > Yes, we need this change to align with the updated firmware on AMD > platforms. Well, it wouldn't be necessary to change the code otherwise. Still, without the patch it is not allowed to play dead in deep idle states (C3 type) and do you know why? Or IOW how likely is this change to break anything on legacy platforms?