Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1868444rwl; Thu, 30 Mar 2023 02:37:29 -0700 (PDT) X-Google-Smtp-Source: AKy350bS8sMcQtqcVXEB73HzKzJpyTweyt6oizCJ2CmpeHqHjtqlnhsYtoKrhEbN/eSdMv60Q0uE X-Received: by 2002:a17:906:49:b0:930:aa02:f9cf with SMTP id 9-20020a170906004900b00930aa02f9cfmr1514868ejg.2.1680169049449; Thu, 30 Mar 2023 02:37:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680169049; cv=none; d=google.com; s=arc-20160816; b=eYxaEOrphA35+g8pxlvNwnByUMLoLR8s8Q2gIopUaRWKd1gRp92SFjfJdmxUnhkuc5 9cgRdbao9Frv+JOEduzvALayFez0XjCu+NoKuBqDGZFq37/0tOqltN2va/ibOoLkFnbn CL7C4Cizw+XqaTgoVa8d+QufMGZeT09d651pRCU5+SBoNEIqXhkIfnFrMl4gqKTdNAFQ IgdM0ZIRw/TgyCKq1mx1/jBQflpWrqjcVdA5zfncmgHmjeTijD2mtcPDHOUkAyJIdUYh kzOHThjnD3+WEpcNSE1Hv9+vkvPejfRPsxggvrznZ5A5JMxv2dtpgE87JaE0BZknzZ0M ZUkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Y5pM3Ee6kq4FJt+4Z1chY+4Ig5/cpTRJ+ZfdXUWDY2U=; b=O0VdTYWsDU+/dCrA5fukYbmCweKU5eZfzxFQYbIz1jr2VwTbRGBgVAGtfYYdYvs2hO NUX2cp3y2iHMH8hWCWvqfmzBk0LUrYGzdfVAh1MHTKpevF8uEAcHwHNbo/dIzwqEaDZs PNE+PXTXP/szrLHvgHqNTQ9Y5JkLDOwAmQ8cjeNM2PztOFAxThEMSgtnTOP2V2t07+WM N07GSerdiNkRhFEy54xXPiV6Kx8Rp8B/UhYpi6Wa1281gEdPbNrndIdGFEOIEDhC9gkz R48LJUQQu3+rkxlTo0IyNY2Ux+VjeQbpcV9lZE/MFEM8wgkVfs4vtWoOPoRc3b9hxx4c zwfQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o6-20020a17090611c600b008c7986cbd76si32498209eja.745.2023.03.30.02.37.04; Thu, 30 Mar 2023 02:37:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229585AbjC3Jej (ORCPT + 99 others); Thu, 30 Mar 2023 05:34:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229379AbjC3Jeh (ORCPT ); Thu, 30 Mar 2023 05:34:37 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 667B9DA; Thu, 30 Mar 2023 02:34:36 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0AC442F4; Thu, 30 Mar 2023 02:35:20 -0700 (PDT) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 14A303F663; Thu, 30 Mar 2023 02:34:33 -0700 (PDT) Date: Thu, 30 Mar 2023 10:34:31 +0100 From: Sudeep Holla To: Maulik Shah Cc: andersson@kernel.org, ulf.hansson@linaro.org, dianders@chromium.org, Sudeep Holla , swboyd@chromium.org, wingers@google.com, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, jwerner@chromium.org, quic_lsrao@quicinc.com, quic_rjendra@quicinc.com Subject: Re: [PATCH v2 1/2] cpuidle: psci: Move enabling OSI mode after power domains creation Message-ID: <20230330093431.xn5wwiwqbne5owf7@bogus> References: <20230330084250.32600-1-quic_mkshah@quicinc.com> <20230330084250.32600-2-quic_mkshah@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230330084250.32600-2-quic_mkshah@quicinc.com> X-Spam-Status: No, score=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 30, 2023 at 02:12:49PM +0530, Maulik Shah wrote: > A switch from OSI to PC mode is only possible if all CPUs other than the > calling one are OFF, either through a call to CPU_OFF or not yet booted. > As per the spec, all cores are in one of the following states: - Running - OFF, either through a call to CPU_OFF or not yet booted - Suspended, through a call to CPU_DEFAULT_SUSPEND Better to provide full information. > Currently OSI mode is enabled before power domains are created. In cases > where CPUidle states are not using hierarchical CPU topology the bail out > path tries to switch back to PC mode which gets denied by firmware since > other CPUs are online at this point and creates inconsistent state as > firmware is in OSI mode and Linux in PC mode. > OK what is the issue if the other cores are online ? As long as they are running, it is allowed in the spec, so your statement is incorrect. Is CPUidle enabled before setting the OSI mode. I see only that can cause issue as we don't use CPU_DEFAULT_SUSPEND. If idle is not yet enabled, it shouldn't be a problem. -- Regards, Sudeep