Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp746671pxb; Tue, 19 Oct 2021 12:05:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLA8BJk8Z2t9TadOJfVT569jEIfknRDOzA8oZ3ZrsiojiJapbwUXFX7zZFYnGqLI5ieCSZ X-Received: by 2002:aa7:9542:0:b0:44c:6db9:f596 with SMTP id w2-20020aa79542000000b0044c6db9f596mr1655374pfq.21.1634670344591; Tue, 19 Oct 2021 12:05:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634670344; cv=none; d=google.com; s=arc-20160816; b=uDN4JhIbo1/Z0iPz2UYwr4mHcT8/ocpdsVfgQpgtyuiH9Wigml3ihsWaN88wnMtCeB 4+9vxZrW7fhpIO+qcex2o0Zdt6xnyjg5J5cJEnxrNUuZOc9zm189Nx2Hwde4i9HbmpV7 Posg7KR5ySRcqeb4aHfLfUIL71dopokB51HR2o1quCOBZ2y8P7lifpi0DpcXiv74rjbE +/BYWR8kXXD8v1C1YjV3PPEVFQU7Gx8MGhW5def+8Jv+sS+veNWBZQz78+gm6xXwQPLP VjuXmh9/DltNP5jvUXQxPbOUe5mk2LzRy/X98NAd2eq6qDlXXGBoxSdj21KznkBKWKj/ 2M8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=5jq+/J8X7Obd2imDcwpZ+MCW2sOsM0kIEXRg40RYP5o=; b=p3arYnTmClG08epjNahm8gOI5dF7WTclWEQ3MTXktSq1Nd/+x2fDpIl7BFfdBGGgHB 4dsoxaFBJ7LVv9vE4dwGRq68G4BjCxM+6jcwlWsEZw5yLJcDNQJauFJ4EW8EQsuNli/Q w/qk6724YEI8Ph+4j6yS34HSDICoW7OTaPnDEE/UwaGdrH3jN98xUMJ1ojnD6hGRfvFA Lc7qgNR4fgDtDXaqTDwn+PAkieNa5vT6CzEip8T2lJhV39Q8/3u369PbcM7Cnkin9ZB0 ReNlXGx5vVNeuyJ1oQ0CbyrxYdcqBlai0+YibLrmss1vYSrAZF/FTXsRNTwLPbdXD3Mf KmlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mjKZ97Eq; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p15si26716880plw.348.2021.10.19.12.05.31; Tue, 19 Oct 2021 12:05: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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mjKZ97Eq; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234846AbhJSTGQ (ORCPT + 99 others); Tue, 19 Oct 2021 15:06:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232717AbhJSTGP (ORCPT ); Tue, 19 Oct 2021 15:06:15 -0400 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB990C06161C; Tue, 19 Oct 2021 12:04:02 -0700 (PDT) Received: by mail-pf1-x435.google.com with SMTP id k26so801875pfi.5; Tue, 19 Oct 2021 12:04:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=5jq+/J8X7Obd2imDcwpZ+MCW2sOsM0kIEXRg40RYP5o=; b=mjKZ97EqSxYXXMQDfdwa8yGmDbqqi9AzYIMPNYrfK9qjoG4d547pyDtwBELYR2UIfr TdcmFpdVAb9VXXkWVM0j/+9E077bhobVhAVuI6n0F0Dg4ftDMWepDyVkYOtF2V1fQXXH 4B5AvBhMF8JPUsxvZeIA0JUm5SM7Sc5eNSeMD2xNyLb8ZqeH7oJBgE4PuZd3YXHAo/fu Kf4y6N5hsj1OVPRJMP+V1E4lXHcblQ0wRTw+6qMqxOO8tz/eszofBGFImrmmC8i8NeD2 vVz9fJ12p3Q5JhbeIYu/yhUU4F93gjXtdcOQ6jSNj4+h+GGAjhRgJhHYMrJ4F4/0JWsk Qecw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=5jq+/J8X7Obd2imDcwpZ+MCW2sOsM0kIEXRg40RYP5o=; b=W0Dz23TGeOa+1C1gShfpdzppR0mOkuw692zqLbP1CL0DLLSIB6FVwdIJIV3+6g3j+9 gFabmaa9oG0qVjSxohhjsu9XSSXksviDp//mav9OFUBUsVP5B39roF7l8w+Qxn+gevFg gw7X/m9fNVmgi9f9S3nspmQdrpfZXVfz83x82f85rJ5w0UjrImrUP7xH6J/KZVWbIOet RWp4qfHzSfGS5ZOKI17JhzUyPwZ05DiNToW43enUW7rYAxD7lXT2AJPqPoInjD83+a09 r6yY/uko0UmhsEnPH64Lo8L1TB2nbAs/fEXAZIQ5Vm+w9k9JSVw2LjsEje5+IvbVjSzt PQ+A== X-Gm-Message-State: AOAM533xtkHDbkNlalUfOPex3v31/GbExhgh27RufQ5ZAiqDkP7RDSv4 gnhMWuE4fY5j1pknd1o2uC5/ol7vGVg= X-Received: by 2002:a05:6a00:248a:b0:44d:ca05:6430 with SMTP id c10-20020a056a00248a00b0044dca056430mr1660847pfv.62.1634670241561; Tue, 19 Oct 2021 12:04:01 -0700 (PDT) Received: from [10.67.48.245] ([192.19.223.252]) by smtp.googlemail.com with ESMTPSA id h24sm17356992pfn.180.2021.10.19.12.03.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 Oct 2021 12:04:00 -0700 (PDT) Subject: Re: [PM] bfcc1e67ff: kernel-selftests.breakpoints.step_after_suspend_test.fail To: "Rafael J. Wysocki" Cc: LKML , Linux Memory Management List , lkp@lists.01.org, lkp@intel.com, kernel test robot , Linux PM References: <20211014075731.GB18719@xsang-OptiPlex-9020> <51c0a15f-1941-f161-dcec-a7a9acc726f2@gmail.com> <6755cf07-fa5a-cbb7-c076-57c162a08c99@gmail.com> <20aedfba-14e3-3677-d21a-b87610095445@gmail.com> From: Florian Fainelli Message-ID: <4300a3d4-76de-70c5-2a7b-c4d066ef5bc6@gmail.com> Date: Tue, 19 Oct 2021 12:03:58 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/19/21 11:53 AM, Rafael J. Wysocki wrote: > On 10/15/2021 9:40 PM, Florian Fainelli wrote: >> On 10/15/21 11:45 AM, Rafael J. Wysocki wrote: >>> On 10/14/2021 11:55 PM, Florian Fainelli wrote: >>>> On 10/14/21 12:23 PM, Rafael J. Wysocki wrote: >>>>> On 10/14/2021 6:26 PM, Florian Fainelli wrote: >>>>>> On 10/14/21 12:57 AM, kernel test robot wrote: >>>>>>> Greeting, >>>>>>> >>>>>>> FYI, we noticed the following commit (built with gcc-9): >>>>>>> >>>>>>> commit: bfcc1e67ff1e4aa8bfe2ca57f99390fc284c799d ("PM: sleep: Do not >>>>>>> assume that "mem" is always present") >>>>>>> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git >>>>>>> master >>>>>>> >>>>>>> >>>>>>> in testcase: kernel-selftests >>>>>>> version: kernel-selftests-x86_64-c8c9111a-1_20210929 >>>>>>> with following parameters: >>>>>>> >>>>>>>       group: group-00 >>>>>>>       ucode: 0x11 >>>>>>> >>>>>>> test-description: The kernel contains a set of "self tests" under >>>>>>> the >>>>>>> tools/testing/selftests/ directory. These are intended to be small >>>>>>> unit tests to exercise individual code paths in the kernel. >>>>>>> test-url: https://www.kernel.org/doc/Documentation/kselftest.txt >>>>>>> >>>>>>> >>>>>>> on test machine: 288 threads 2 sockets Intel(R) Xeon Phi(TM) CPU >>>>>>> 7295 >>>>>>> @ 1.50GHz with 80G memory >>>>>>> >>>>>>> caused below changes (please refer to attached dmesg/kmsg for entire >>>>>>> log/backtrace): >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> If you fix the issue, kindly add following tag >>>>>>> Reported-by: kernel test robot >>>>>> Thanks for your report. Assuming that the code responsible for >>>>>> registering the suspend operations is drivers/acpi/sleep.c for your >>>>>> platform, and that acpi_sleep_suspend_setup() iterated over all >>>>>> possible >>>>>> sleep states, your platform must somehow be returning that >>>>>> ACPI_STATE_S3 >>>>>> is not a supported state somehow? >>>>>> >>>>>> Rafael have you ever encountered something like that? >>>>> Yes, there are systems with ACPI that don't support S3. >>>> OK and do you know what happens when we enter suspend with "mem" in >>>> those cases? Do we immediately return because ultimately the firmware >>>> does not support ACPI S3? >>> "mem" should not be present in the list of available strings then, so it >>> should be rejected right away. >> Well yes, that was the purpose of the patch I submitted, but assuming >> that we did provide "mem" as one of the possible standby modes even >> though that was wrong (before patch), and the test was trying to enter >> ACPI S3 standby, what would have happened, would the ACPI firmware honor >> the request but return an error, or would it actually enter ACPI S3? >> >> In any case, I will change the test to check that this is a supported >> standby mode before trying it. > > Unfortunately, I will need to revert bfcc1e67ff1e4aa8bfe2, because it > breaks user space compatibility and that's got caught properly by the test. Reverting my commit will break powerpc and other ARM/ARM64 platforms where mem is not supported (via PSCI), I have a change pending for PSCI that will actually check that SYSTEM_SUSPEND is supported before unconditionally making use of it. > > What happens is that "mem" is a "pointer" to a secondary list of > possible states and that generally is "s2idle shallow deep" and if > s2idle is the only available option, it will be just "s2idle". > > This list is there in /sys/power/mem_sleep. > > It was done this way, because some variants of user space expect "mem" > to be always present and don't recognize "freeze" properly. > > Sorry for the confusion. So how do we all get our cookie here? Should we just slap an #ifndef CONFIG_ACPI in order to allow platforms that do not have "mem" to not have it? -- Florian