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 X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 172DCC432C3 for ; Fri, 15 Nov 2019 17:31:04 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DEE9A2073B for ; Fri, 15 Nov 2019 17:31:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="PTyboGoV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DEE9A2073B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Cbe3S16OmNXLceJ6k+CWnCqlGWmUinA8ovTLulJwZ/4=; b=PTyboGoV2uulFE Cp3H/4Q6sZcQ8fQQb7gcN6XCXmu0heDexkHJn7g2HbiIGB0HM9hK69evogNckyw2yFqhmsimsg1UG 6PlTcJwllSkLAF58epjvQ2w9Eyv0NuIuuVD9Cz76ANtWNb4VSgmUBZ2nQRO5/CfO0dONNtY/X875G NEhYxKfswoEF2Z/WHm+4AV6FyeLzrRU7GiB6C0zAP0u5XLKo6gmLx/G/N0yEFf3hsqNjP4U7X6ktO R0KuxTeCtVO8bhe3bHiDlFtfoVmiURsAWe/3d8r/HXG4C+BLwlzixx4AthFPz86mE9g01/piI8XiF lLUEF53IoO7B56WhCZSw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iVfR0-0003AL-L2; Fri, 15 Nov 2019 17:31:02 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iVfQx-00039k-Mn for linux-arm-kernel@lists.infradead.org; Fri, 15 Nov 2019 17:31:01 +0000 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 DF2C531B; Fri, 15 Nov 2019 09:30:57 -0800 (PST) Received: from bogus (e107155-lin.cambridge.arm.com [10.1.196.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C1F7B3F6C4; Fri, 15 Nov 2019 09:30:55 -0800 (PST) Date: Fri, 15 Nov 2019 17:30:53 +0000 From: Sudeep Holla To: Ulf Hansson Subject: Re: [PATCH v2 10/13] cpuidle: psci: Prepare to use OS initiated suspend mode via PM domains Message-ID: <20191115173053.GE27170@bogus> References: <20191029164438.17012-1-ulf.hansson@linaro.org> <20191029164438.17012-11-ulf.hansson@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20191029164438.17012-11-ulf.hansson@linaro.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191115_093059_783557_E7350070 X-CRM114-Status: GOOD ( 15.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Lorenzo Pieralisi , linux-pm@vger.kernel.org, Stephen Boyd , linux-arm-msm@vger.kernel.org, Daniel Lezcano , "Rafael J . Wysocki" , Andy Gross , Lina Iyer , Bjorn Andersson , Kevin Hilman , Rob Herring , Lina Iyer , Sudeep Holla , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Oct 29, 2019 at 05:44:35PM +0100, Ulf Hansson wrote: > The per CPU variable psci_power_state, contains an array of fixed values, > which reflects the corresponding arm,psci-suspend-param parsed from DT, for > each of the available CPU idle states. > > This isn't sufficient when using the hierarchical CPU topology in DT, in > combination with having PSCI OS initiated (OSI) mode enabled. More > precisely, in OSI mode, Linux is responsible of telling the PSCI FW what > idle state the cluster (a group of CPUs) should enter, while in PSCI > Platform Coordinated (PC) mode, each CPU independently votes for an idle > state of the cluster. > > For this reason, introduce a per CPU variable called domain_state and > implement two helper functions to read/write its value. Then let the > domain_state take precedence over the regular selected state, when entering > and idle state. > > Finally, let's also avoid sprinkling the existing non-OSI path with > operations being specific for OSI. > Mostly looks good. I am still wondering if we can keep all OSI related info in the newly created structure and have psci_states outside it as before. And I was think psci_enter_idle_state_pc and psci_enter_idle_state_osi instead of single psci_enter_idle_state and assign/initialise state->enter based on the mode chosen. I had to closer look now and looks like enter is initialised in generic dt_idle_states. That said, what you have in this patch also looks OK to me, was just trying to avoid access to the new structure all together and keep the PC mode patch almost same as before when suspending. I will see what Lorenzo thinks about this. -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel