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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8813BC04A68 for ; Wed, 27 Jul 2022 20:51:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232399AbiG0UvP (ORCPT ); Wed, 27 Jul 2022 16:51:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229924AbiG0UvO (ORCPT ); Wed, 27 Jul 2022 16:51:14 -0400 Received: from mail-qv1-xf2e.google.com (mail-qv1-xf2e.google.com [IPv6:2607:f8b0:4864:20::f2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4C765071D for ; Wed, 27 Jul 2022 13:51:13 -0700 (PDT) Received: by mail-qv1-xf2e.google.com with SMTP id f9so81332qvr.2 for ; Wed, 27 Jul 2022 13:51:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3MimbQxk9gBAT10hM+BMRcfkfN4McVaow40wDd+ExhE=; b=dk6fnxggUuYs3KCxaVouaJW51zBKcqV4CFXo1ZslOYtxvU3XxR8wedILt5Cj1SjZqW gJZdlzB+HKvkWoJuywbNbLPLixfxxoJz14TZMzf2lMpXeGuj9Z3e2jGkEAA9O8E9KkfJ wcZIAcFlRcxWH/W/TfLU8XMgnx7G0x3/gZ0gzp5utuKX3UZvOvqSLZK1g+apCHivkPoQ 5Pl8tfOeH0edfjXGetU7VbGOMab46CVTFZIxDM5Aasjd+1EeLtzxUSGpCZFvVpwaxdVh cMFo8twmDnG86/c6oYpaFHn1ouXTdi/vcNtMS8HTmlYyOj7MmguqVsZt7EUHsjGDiaAP B2zg== 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; bh=3MimbQxk9gBAT10hM+BMRcfkfN4McVaow40wDd+ExhE=; b=j3tDHoqgyMNKJkyB3Bk4B03TMasjVsurKNDJRLuMwFM42Qm2Vjr3yH+F706d4xCxYC grmoW3mM6ZiPYj6XKivwj4+35vra388VYJusXB2xnDiPhvLSz1TlRu+hfeNLmaICUZ6n pPy1j00RmDwLrnRnuCrrOE/XKanSLb04bbkak9DzGq1V7NCzOIq3tJ36mWnnmk7vMGuI LXqkMPRWUFjqyFM0W1TK6bYKPxuVATB135D8vNtZHfIQ7pxDk2zvv3zbHZhtOkgln5Fs O7SbtfuS+A4e20ifG56GYYfMJSYsawFde7eqchNu5AxX4IRIZHblr+4VkZeXuJ93+OPx CwcQ== X-Gm-Message-State: AJIora+bw4xSdwa0HP078Ka3luGfRDU1GAFHnyTPiufLpNJvq9u3DxE7 TLbxDg6BJsCM6XTSBxjBQdi7cVbgZYyEimxDSyTadA== X-Google-Smtp-Source: AGRyM1tuvxdRkL8TNAQWYCPS3S3HpR3TBUr0lC6PLUO0qAmXfaEV3lBIFV1MY0mudqjTzswos9YEBmjX7MR6zblPtq8= X-Received: by 2002:ad4:5761:0:b0:473:7861:69d1 with SMTP id r1-20020ad45761000000b00473786169d1mr21147659qvx.73.1658955072842; Wed, 27 Jul 2022 13:51:12 -0700 (PDT) MIME-Version: 1.0 References: <20220727111410.bglx2u26456ray2u@bogus> In-Reply-To: From: Dmitry Baryshkov Date: Wed, 27 Jul 2022 23:51:01 +0300 Message-ID: Subject: Re: PSCI domains without OSI support To: Sudeep Holla Cc: Ulf Hansson , linux-arm-msm@vger.kernel.org, Bjorn Andersson , Vinod Koul , Linux PM Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Wed, 27 Jul 2022 at 16:39, Dmitry Baryshkov wrote: > > On Wed, 27 Jul 2022 at 16:24, Dmitry Baryshkov > wrote: > > > > On Wed, 27 Jul 2022 at 14:14, Sudeep Holla wrote: > > > > > > On Wed, Jul 27, 2022 at 12:09:27PM +0300, Dmitry Baryshkov wrote: > > > > > - Allow DTS forcing the PSCI power domains even if OSI enablement fails? > > > > > > Meaning DTS flag for this ? If OSI enable fails, why would you want to > > > still proceed. It is non-compliant and must be fixed if the firmware > > > supports OSI and expects OSPM to use the same. > > > > I'm not sure at this moment. PSCI firmware reports that OSI mode is > > supported, but then when psci_pd_try_set_osi_mode() tries to switch > > into OSI mode, it gets NOT_SUPPORTED. > > Just for the sake of completeness, I added a print to the psci.c to > > dump the result of the psci_set_osi_mode(false). It also returns > > NOT_SUPPORTED! > > > > My logical assumption would be that the firmware reports support for > > OS_INITIATED, but then just fails to properly support > > SET_SUSPEND_MODE. > > Okay. From the msm-3.14 commit log: > > Add support to terminate all low power modes in PSCI. The lpm-levels will > work with version 1.0 of PSCI specification using the OS initiated scheme. > The lpm-levels driver would determine the last man standing and vote into > TZ accordingly. > > Which means that the vendor kernel expected to work in the OSI mode > without calling SET_SUSPEND (such call doesn't exist in 3.14) After adding the debugfs file, it's clear that this is the case. Compare msm8996: PSCIv1.0 SMC Calling Convention v1.0 is assumed OSI is supported Extended StateID format is used vs sdm845: PSCIv1.1 SMC Calling Convention v1.2 OSI is supported Extended StateID format is used CPU_FREEZE is supported SET_SUSPEND_MODE is supported Judging by people reporting 'failure to enable OSI mode' on several other Qualcomm SoCs (msm8976, msm8953), this bug is present on several older Qualcomm platforms. > > So, this looks like the "force-psci-domains" or "ignore-osi-error" > flag would be logical. > The question about testing still holds. -- With best wishes Dmitry