Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp283250imm; Mon, 21 May 2018 06:07:04 -0700 (PDT) X-Google-Smtp-Source: AB8JxZopO9j/S0Kkl3VKfKmwSIiK3KJ5mMd724jIOupnC5sO1uDihRsT9OV2+0YQQV8agoFVdQUz X-Received: by 2002:a63:7d19:: with SMTP id y25-v6mr10093124pgc.165.1526908024795; Mon, 21 May 2018 06:07:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526908024; cv=none; d=google.com; s=arc-20160816; b=GL5s6PzzTSdYvk1kMWBzqrmg01soOoSybUKKHsRNtZRNnIrhY42scDyde+D15ETjo/ Pyxz1CcTOJPWTLGP1rfHIOArol5Sl+n7BRsl/PVq/TF6+i87uh6GeHusDWKKR5KKukWt Ydy+iNkqhFh/oeW6r9hSk+cnMP9cxExzg3nblHleyBDEO1aR7RCnfOiJad5gcp2DaeIb JAzmc8GfaBF0GYY5vLhsHwKkFduDoQWAFgnpJODTqV1Z9wTfV2fJUzUJyC3uZbmggOU5 SHTwSI0RvAmG//FBc9EE97UYLYRuL1NJcy5BxtV5EjPWbCsKgku4HIlVU3KxZl6VAdsh jyuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:to:subject:cc :arc-authentication-results; bh=Bj1CW2rxR3Sw6V4olnf8mmyMRVu6TxOHiygQDWHW3Pg=; b=KoSdw7b1XRYVqnQ2isihg12l7SztqW+oZgG69Eoe8Y/Sao6TP/Jgcvvt6bVIsc4UtM MrcEbv0cjJRm7arXYyO9Booyky63738ODuby0fn8ppRcoknjNmcetg/xoLbnHBh20IYW aCZKuNOAma2Aj8DnC0i24EuDWNItojCxLlopV+UnOo2zBb0y5sMVbO8Jd+EPPyKPDvoE oWKcathgWAw7XXsuST4GRTFcRP12H+aDAAoFCJ8zQKM1XYKF1Veaase7u/+qa2L3thQv SF6pRnW0MBKCHpc1Auzo9nkZwJjW9ezLaDbbA94EtjnAoWbkDI3/U+zLUYwemb1Y+abX QQXQ== 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 be11-v6si14599754plb.322.2018.05.21.06.06.49; Mon, 21 May 2018 06:07:04 -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 S1752648AbeEUNE7 (ORCPT + 99 others); Mon, 21 May 2018 09:04:59 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:49334 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752398AbeEUNE5 (ORCPT ); Mon, 21 May 2018 09:04:57 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C13C480D; Mon, 21 May 2018 06:04:56 -0700 (PDT) Received: from [10.1.210.28] (e107155-lin.cambridge.arm.com [10.1.210.28]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 688BE3F577; Mon, 21 May 2018 06:04:46 -0700 (PDT) Cc: Sudeep Holla , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, rnayak@codeaurora.org, amit.kucheria@linaro.org, nicolas.dechesne@linaro.org, celster@codeaurora.org, tfinkel@codeaurora.org Subject: Re: [PATCH] cpufreq: Add Kryo CPU scaling driver To: ilialin@codeaurora.org, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, mark.rutland@arm.com, viresh.kumar@linaro.org, nm@ti.com, lgirdwood@gmail.com, broonie@kernel.org, andy.gross@linaro.org, david.brown@linaro.org, catalin.marinas@arm.com, will.deacon@arm.com, rjw@rjwysocki.net, linux-clk@vger.kernel.org References: <1526555955-29960-11-git-send-email-ilialin@codeaurora.org> <1526729701-8589-1-git-send-email-ilialin@codeaurora.org> <153cc316-dcb5-972f-5a2f-c91fe0f6348b@arm.com> <000f01d3f103$3ff78ba0$bfe6a2e0$@codeaurora.org> From: Sudeep Holla Organization: ARM Message-ID: <2ace10bc-e1c4-2060-94d3-eb71e966ffbe@arm.com> Date: Mon, 21 May 2018 14:04:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <000f01d3f103$3ff78ba0$bfe6a2e0$@codeaurora.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/05/18 13:57, ilialin@codeaurora.org wrote: > [...] >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> + >>> +#define MSM_ID_SMEM 137 >>> +#define SILVER_LEAD 0 >>> +#define GOLD_LEAD 2 >>> + >> >> So I gather form other emails, that these are physical cpu number(not even >> unique identifier like MPIDR). Will this work on parts or platforms that need >> to boot in GOLD LEAD cpus. > > The driver is for Kryo CPU, which (and AFAIK all multicore MSMs) > always boots on the CPU0. That may be true and I am not that bothered about it. But assuming physical ordering from the logical cpu number is *incorrect* and will break if kernel decides to change the allocation algorithm. Kernel provides no guarantee on that, so you need to depend on some physical ID or may be DT to achieve what your want. But the current code as it stands is wrong. -- Regards, Sudeep