Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1175616rwl; Fri, 31 Mar 2023 07:39:14 -0700 (PDT) X-Google-Smtp-Source: AKy350Zy6HD3BX9gPkRzNcxx91XuF4aC3+0irUoZtI6/svF2spwo/6AQSd+wSZbrl6jdDOIKnk6b X-Received: by 2002:a17:902:7c0d:b0:1a0:7663:731b with SMTP id x13-20020a1709027c0d00b001a07663731bmr23738878pll.5.1680273554097; Fri, 31 Mar 2023 07:39:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680273554; cv=none; d=google.com; s=arc-20160816; b=MH/EfedD+lTUKq+NriqJClfnBuObfIaq8iI0RJcfLYk3W7kpBSnzCXGVYcLvv+sAMJ /A+kQNQ+p8GBbSoM8UvVdVIBydctYjwRR1IgqmHxe2MGsfGDhlftz67APXmv/hvkXFFx prKo/6V+koaqmqvdrYZCgX+RpW9z+Pl0O1wolsMkUQ/ZuczL5nXmvPOMohD4Z+xo4n4+ JVdb8P3uuPYstHTEfyddGngkJTEeU117LD5yqpH7l1UNfDcLs01917zZVapWEqCa+k+a xSl+YzLzi2Mo4I6CqBH59Anyhf3Sq7bffFsdhwsGf65sfkmfDnDUqMVYuMQxAH7UJ21C R42w== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=PzuLLRgit64EoYj/DuqgWeHbJ97Xks/ZNFz6FIt7l+M=; b=bGXigmO8AwnNhhpruBVNMRQxnDe9NLD04eY1dsWANBAx8vEG8dZOROq7MHZu6g2Vd+ exQK32n7KsAmEW3wv2NBuHogvH0d2ibc8ITialYPbWKIGz6YYwfQ7KZUTOF0SqxVrFXy /hM6d0VTx9E6S78lN2N3HaKFcLGOobcDoo7YrvLJuXfh0rV3u+9K2SaX7eEPRvIctouh Jkl87UXuUMLvu4HFSpRjP39Vt3ok1VLRybLPu8elp4aRSXBgDzUHUhI/ACLoGaT18LnY fPVa0UVzE2PFwck1gr1wduSZQB7AxHs15WR1jDZ/3sREc6GCPaMHScW27k2O8PgtMuf8 srFQ== 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 g19-20020a170902e39300b001a04202f77bsi2161621ple.431.2023.03.31.07.39.01; Fri, 31 Mar 2023 07:39:14 -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 S232464AbjCaOgr (ORCPT + 99 others); Fri, 31 Mar 2023 10:36:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231661AbjCaOgq (ORCPT ); Fri, 31 Mar 2023 10:36:46 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DD15D2112; Fri, 31 Mar 2023 07:36:44 -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 5A8C82F4; Fri, 31 Mar 2023 07:28:12 -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 74E493F663; Fri, 31 Mar 2023 07:27:26 -0700 (PDT) Date: Fri, 31 Mar 2023 15:27:24 +0100 From: Sudeep Holla To: Wing Li Cc: Ulf Hansson , Maulik Shah , andersson@kernel.org, dianders@chromium.org, swboyd@chromium.org, 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: <20230331142724.ogvruad7txfe7ji2@bogus> References: <20230330084250.32600-1-quic_mkshah@quicinc.com> <20230330084250.32600-2-quic_mkshah@quicinc.com> <20230330093431.xn5wwiwqbne5owf7@bogus> <20230330131334.idb25zf4tdf3zqn3@bogus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 06:40:03PM -0700, Wing Li wrote: > Adding some clarifications. > > On Thu, Mar 30, 2023 at 6:13 AM Sudeep Holla wrote: > > > On Thu, Mar 30, 2023 at 02:06:19PM +0200, Ulf Hansson wrote: > > > On Thu, 30 Mar 2023 at 11:34, Sudeep Holla wrote: > > > > > > > > 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. > > > > The spec quoted above only applies when switching from platform-coordinated > mode to OS-initiated mode. > > For switching from OS-initiated to platform-coordinated, which is the case > Maulik is referring to, section 5.20.2 of the spec specifies: > "A switch from OS-initiated mode to platform-coordinated mode is only > possible if all cores other than the calling one are OFF, either through a > call to CPU_OFF or not yet booted." > > My bad, I read/imagined it as PC->OSI mode couple of times even though it is pretty explicit. Sorry for that. And thanks a lot for pointing that out. -- Regards, Sudeep