Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3407906ybi; Fri, 19 Jul 2019 02:48:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqx38PvpfN+TLpAaHKgHXII1SmKKKQr5s+oOTg6iaHNiAT9NJaTeT6iEFp1y6XqG3iJRBzx6 X-Received: by 2002:a17:902:7687:: with SMTP id m7mr1421053pll.310.1563529683114; Fri, 19 Jul 2019 02:48:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563529683; cv=none; d=google.com; s=arc-20160816; b=ri3ieM8sLaDc0QRxWOrU1tzmujh4kZcsQ/DLmzPR9o54N1PT6jQ8Xn9D3qLwal6uHn R+XH6oyfZqrJwDlNZSEZ5GCZ8RfaopC7xPSOWCXkSZWWRIywf7ffkxNLMmNp/4M1kYQE rEV5p4ONTB0YFP52KIlLHyXSIw280hVB3ucmpMXg0IjCPfgEKs7fZXJ9mwiP2dLXifJq LFw6gQzZ976R9bsq017+LE8Iv1N6C51G5zfxvGp4ttY4pFVCnWDvVGRLwIT0oiH6LPwO kDk4K9AeGT9ZycEUcwpV6FMxnrAMhemROTngiRys4ZACoqUM7VKKO+AC0XOEkHIW5RQG 8I+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=F6ueP3rYgFiofox7iJhAceuArhe6ZvBk/CR6cQ+eJD0=; b=sku38sReiIfUdB8wVahhtCGDyYz4brKdYrChn+UR7IUIFDvCog1d3zRt6sOu3H6RH8 UUOONQw0LmXQ0i4LiASsiohVEQfP94miG5RkyUxKee+6LgXj5QRLZpVASfocrlZnd/2Q hnmeoCk9iF7boujBc0f1IYR+HCE/CYAgc35EFm4HFQnCHaxx1e7pkFnc8RjeFtbBrI3+ 3UR0vTkuIHPh0VymgMahbi4sRX84Ex1rfehzqNHcS59sMbDmcfgYajPjXZ9FNuaFaIge 95n+mJrijNC2/jLJ7+RRe1+EejOEHU9gZkdISGmkuC4Y2KmUvypB75PffYYySZqrcvzf 9pIA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h33si939342pje.95.2019.07.19.02.47.47; Fri, 19 Jul 2019 02:48:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726773AbfGSJpu (ORCPT + 99 others); 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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