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.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 78744C76188 for ; Fri, 19 Jul 2019 09:45:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5388121849 for ; Fri, 19 Jul 2019 09:45:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725853AbfGSJpu (ORCPT ); Fri, 19 Jul 2019 05:45:50 -0400 Received: from foss.arm.com ([217.140.110.172]:40966 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725794AbfGSJpu (ORCPT ); Fri, 19 Jul 2019 05:45:50 -0400 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 93A29337; Fri, 19 Jul 2019 02:45:49 -0700 (PDT) Received: from e107155-lin (e107155-lin.cambridge.arm.com [10.1.196.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C7DE33F59C; Fri, 19 Jul 2019 02:45:46 -0700 (PDT) Date: Fri, 19 Jul 2019 10:45:30 +0100 From: Sudeep Holla To: Lina Iyer Cc: Ulf Hansson , Lorenzo Pieralisi , Mark Rutland , Linux ARM , "Rafael J . Wysocki" , Daniel Lezcano , "Raju P . L . S . S . S . N" , Amit Kucheria , Bjorn Andersson , Stephen Boyd , Niklas Cassel , Tony Lindgren , Kevin Hilman , Viresh Kumar , Vincent Guittot , Geert Uytterhoeven , Souvik Chakravarty , Linux PM , linux-arm-msm , Linux Kernel Mailing List , Lina Iyer , Sudeep Holla Subject: Re: [PATCH 09/18] drivers: firmware: psci: Add support for PM domains using genpd Message-ID: <20190719094530.GA15248@e107155-lin> References: <20190513192300.653-1-ulf.hansson@linaro.org> <20190513192300.653-10-ulf.hansson@linaro.org> <20190716150533.GD7250@e107155-lin> <20190718131913.GB28633@e107155-lin> <20190718175746.GE25567@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190718175746.GE25567@codeaurora.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Thu, Jul 18, 2019 at 11:57:46AM -0600, Lina Iyer wrote: > On Thu, Jul 18 2019 at 07:19 -0600, Sudeep Holla wrote: [...] > > > > Yes 2 different issues here: > > 1. The direct assignment overwriting the value is problem which you agree. > > 2. The OR logic on it's own is bit not so clear from the specification. > > Since firmware authors need to be aware of this to make all these > > work. So it's not implicit, either we set this requirement in form > > of binding. We were also thinking of stating composite state in the > > DT, still just a thought, need to come up with examples/illustrations. > > > It is generally very obvious to firmware authors to map hardware > definitions to specific bits in the state param. If a cluster component > has more than on/off state, more bits are assigned to the define the > idle states of the component. While I completely agree that generally the firmware authors tend to assign a bit(s) to indicate a state, it not so evident from the PSCI specification. My worry is someone shouldn't come up with sequential numbering and expect this to work. I am fine with OR, but we need to document it somewhere so that we can point people so that the driver in the kernel is not expected to work with any other schema of numbering StateID that violates the assumption. > Addition is also an option, but there are enough bits compared to the > hardware components that we have in each state, that it hasn't been a > problem. > Yes, but with extended format, the StateType move to bit 30, and if we represent each individual state to indicate that bit correctly(I except everyone to so that and it shouldn't cause issue if we OR the parameters to get composite states), addition may cause issues. -- Regards, Sudeep