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=-5.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 E1408CA9EB9 for ; Sun, 27 Oct 2019 02:21:27 +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 B3969206DD for ; Sun, 27 Oct 2019 02:21:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="HHyPimdn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B3969206DD 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=EKQNgeLDf1Q4dGWXoqtFKvMqhV8eotBviVpdXLC5/o4=; b=HHyPimdn7LfBBZ ijllOEh3H0RTkd5NUhSd4yguBmLArH2KvDdABSrDP3K1Uu8whog4aMdBLwTKs0I0qQ5yzOMlijv5q Ja+3muDhS6DXVJVr7zOvX2aTQtm2OdronOzBETEYVeJCDqa4q7jPkaKQa87K13GRDILC1+nivZ8jW W9kNotD2+ZGZELYjDJWMdb58kIbgmo/s5wW+i4TY5o4qyN9jV/3bP/TfoUgxP2D8IycJooiliScY7 /QWb1u7+A8SJaG0X83V5ZtGMi8vgDY1RZjOLZvtq0dYhf1xsWXzSxV3ByJpJ9hgtSsZY4XXa5ulg9 XDoJ6ERxcqoLGASc5Avg==; 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 1iOYBL-0001e4-71; Sun, 27 Oct 2019 02:21:27 +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 1iOYBI-0001dX-8z for linux-arm-kernel@lists.infradead.org; Sun, 27 Oct 2019 02:21:25 +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 7A7DE1FB; Sat, 26 Oct 2019 19:21:18 -0700 (PDT) Received: from e107533-lin.cambridge.arm.com (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9BA263F6C4; Sat, 26 Oct 2019 19:21:13 -0700 (PDT) Date: Sun, 27 Oct 2019 02:20:56 +0000 From: Sudeep Holla To: Ulf Hansson Subject: Re: [PATCH] cpuidle: psci: Align psci_power_state count with idle state count Message-ID: <20191027022056.GA18111@e107533-lin.cambridge.arm.com> References: <20191010113937.15962-2-ulf.hansson@linaro.org> <20191024151834.17036-1-sudeep.holla@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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-20191026_192124_361409_CA3524D4 X-CRM114-Status: GOOD ( 17.79 ) 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 , Kevin Hilman , Stephen Boyd , linux-arm-msm , Linux PM , Daniel Lezcano , "Rafael J. Wysocki" , Lina Iyer , Bjorn Andersson , Rob Herring , Linux ARM 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 Thu, Oct 24, 2019 at 06:10:09PM +0200, Ulf Hansson wrote: > On Thu, 24 Oct 2019 at 17:18, Sudeep Holla wrote: > > > > Instead of allocating 'n-1' states in psci_power_state to manage 'n' > > idle states which include "ARM WFI" state, it would be simpler to have > > 1:1 mapping between psci_power_state and cpuidle driver states. > > > > ARM WFI state(i.e. idx == 0) is handled specially in the generic macro > > CPU_PM_CPU_IDLE_ENTER_PARAM and hence state[-1] is not possible. However > > for sake of code readability, it is better to have 1:1 mapping and not > > use [idx - 1] to access psci_power_state corresponding to driver cpuidle > > state for idx. > > > > psci_power_state[0] is default initialised to 0 and is never accessed > > while entering WFI state. > > > > Signed-off-by: Sudeep Holla > > Reported-by: Ulf Hansson > Reviewed-by: Ulf Hansson > > > --- > > drivers/cpuidle/cpuidle-psci.c | 8 +++++--- > > 1 file changed, 5 insertions(+), 3 deletions(-) > > > > Hi Ulf, Lorenzo, > > > > Just to avoid confusion, I thought I will just write this patch as I was > > about to make reference to this in my review. > > As discussed with Lorenzo, I said I was going to adopt his review > comments, which means I already have a patch for this locally. > > Nevermind this time, but I would appreciate if this kind of > bikeshedding can been avoided future wise. > That's one of the reason I just wrote the patch as I felt describing it it words was difficult compared to patch :). Sorry if you felt this was bikeshedding. -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel