Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2030583ybc; Wed, 13 Nov 2019 08:00:31 -0800 (PST) X-Google-Smtp-Source: APXvYqx4e8btOP6pXIf3YV74ZnMyKXlVxLZz9jCrKL9CgnFPxfirNZMzm7b9p2I4ibpz+KjGVIEd X-Received: by 2002:a17:906:1611:: with SMTP id m17mr3571631ejd.281.1573660831078; Wed, 13 Nov 2019 08:00:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573660831; cv=none; d=google.com; s=arc-20160816; b=MFl8Klo9n+EXgje/+iD+rSooAKvmPs+sKHKZXekTQunOEDjZqzhWAjAKi38HPZzsA/ W4yJ/TsgIQiWJRiWc8kYk2W756TRZIWVY9h0jKNWtVyZDfWcTo+54SjnTlxvGpDMzfjX 9Zf3GvAvF9AEFvSUmrGcXJZHxu5qViCmMsL4/hw8cxmEVs0F+/wSoqtw2WSSG9hpbXIJ O96673npBfF4yiSTTrzagjiP+vGjeU9nbEJGyghQgEFQzK6ljNC4w3BNpx0u2ArJh1+P eBtNpnED5ukg9XszYq5Olz8UcNFjVH41nuvlGb/ozwT76jb0gAnLZ3atRJK5D2EAzqQ1 UbTw== 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:from:references:cc:to:subject:dkim-signature; bh=dd8DkIORvL+QLs2iRz7r6c4ippkrhOFQgZqGhUsz2UE=; b=zx6OO9IUu5hskb1rnrD0KgmzZKMzA0GcTaVE6bpWuTPYs1DJAPgtCRaly6pCxmkMxb 1C4HR7IpqKDBm4igp9OmLlterIZgSaVPLN6hkuknyvcw5baLtZwktsJa1rziiFYL1aAQ rG9BFKhyHg0SlRXW25ykOstN/ALCpi7nJJ4CTIT5DQIWfaKoYiPR2e45WT73uPGDUnzK 3iqDfp/+XLOoHMoOtS8OXZE57d3UCdvErpZN/9kyIdzj7rkRRm/ANeawIhF62FlrujLp Oc0Gh6J6zoiZizThD+9q3LFlFhumhh9Qf1uuArxIPP0Zee41SwYrss7qF2iaDy0qVDNk wk5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TBciHYu8; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d6si1840640ede.119.2019.11.13.08.00.05; Wed, 13 Nov 2019 08:00:31 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TBciHYu8; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727667AbfKMN51 (ORCPT + 99 others); Wed, 13 Nov 2019 08:57:27 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:43684 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726190AbfKMN5Z (ORCPT ); Wed, 13 Nov 2019 08:57:25 -0500 Received: by mail-lj1-f194.google.com with SMTP id y23so2650792ljh.10; Wed, 13 Nov 2019 05:57:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=dd8DkIORvL+QLs2iRz7r6c4ippkrhOFQgZqGhUsz2UE=; b=TBciHYu83sbNwzrT0mMqbTW5AsBPWo1eiSOqa5j2rrvnri8JL7coLoP6S2kaGHxHDY YhFJBZP4KwCWTHlBMevYYG3vy3fdakdQw9IMYJtqWrp8IZ4loJNaukR4I7lvtaDN78hn WQk3vPyurU+mjZ4QUFifjKp9kA8vKYe8+UMx290A/gfhWLvrPiVPAoxPhAitd3NwslMe 9hvFlrfIj/nHLlPXd8Lkib/7B/sfEb6RHi4cQj9dVIagzpTreiPuF2i043KQlL/xwceO v0bMtRSHwZofnJOCHiefoVylpMJYhe3WX2SL4/tHwka3M8NAAMzpDeQUfPpW2pgg1IAe 2Pzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=dd8DkIORvL+QLs2iRz7r6c4ippkrhOFQgZqGhUsz2UE=; b=Y+SfqVN1G5RrezeJL9HE96S7gzCyMyrWtCgwjTNEzGZICOlOrAruQisvl8JDuRZ2IQ H1/1bkCI0/TWFfV+mvnWu3hzOgsExH2dGCq0I+9QyBEPpyCI01wAftgxSDDNxWZ+hYK0 71IzkVlbM8IFqIzX95935NfNECdZ2KfB+PgSwGrsB7iOywYDNz8FCinbIAbEXJSWtl7I nLa+pdvb+RQ1SaW2zn8XzaGwxLwWWop7NiaJ5uYbWyCf6dKkpQe8wau80grvYvRpIGd2 I84b/r4Evf3cglg1CSzv5UjYSLLwCv2SWm5AnbowCXxvRPBt8gk1aAnMardxJfhOifRe IR/Q== X-Gm-Message-State: APjAAAW8f24t/FWGGUuKDUxh87CzHJChBEcURCk5akC0LYvJZiPuxFJc A4Ncabh1/a/JNP2dcjy4GPcpgmGb X-Received: by 2002:a05:651c:1127:: with SMTP id e7mr2669748ljo.70.1573653442641; Wed, 13 Nov 2019 05:57:22 -0800 (PST) Received: from [192.168.2.145] (94-29-10-250.dynamic.spd-mgts.ru. [94.29.10.250]) by smtp.googlemail.com with ESMTPSA id n8sm1093579lfe.31.2019.11.13.05.57.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Nov 2019 05:57:21 -0800 (PST) Subject: Re: [PATCH v2 17/17] ARM: dts: tegra30: cardhu-a04: Add CPU Operating Performance Points To: Jon Hunter , Thierry Reding , Peter De Schrijver , Prashant Gaikwad , "Rafael J. Wysocki" , Viresh Kumar , Rob Herring , Michael Turquette , Stephen Boyd , Peter Geis , Nicolas Chauvet , Marcel Ziswiler Cc: linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org References: <20191024221416.14197-1-digetx@gmail.com> <20191024221416.14197-18-digetx@gmail.com> From: Dmitry Osipenko Message-ID: <8974f1a8-72bb-4413-d2b5-057853696fb4@gmail.com> Date: Wed, 13 Nov 2019 16:57:20 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Jon, 13.11.2019 09:52, Jon Hunter пишет: > > On 24/10/2019 23:14, Dmitry Osipenko wrote: >> Utilize common Tegra30 CPU OPP table. CPU DVFS is available now on >> cardhu-a04. >> >> Signed-off-by: Dmitry Osipenko >> --- >> arch/arm/boot/dts/tegra30-cardhu-a04.dts | 24 ++++++++++++++++++++++++ >> 1 file changed, 24 insertions(+) >> >> diff --git a/arch/arm/boot/dts/tegra30-cardhu-a04.dts b/arch/arm/boot/dts/tegra30-cardhu-a04.dts >> index 0d71925d4f0b..9234988624ec 100644 >> --- a/arch/arm/boot/dts/tegra30-cardhu-a04.dts >> +++ b/arch/arm/boot/dts/tegra30-cardhu-a04.dts >> @@ -2,6 +2,8 @@ >> /dts-v1/; >> >> #include "tegra30-cardhu.dtsi" >> +#include "tegra30-cpu-opp.dtsi" >> +#include "tegra30-cpu-opp-microvolt.dtsi" >> >> /* This dts file support the cardhu A04 and later versions of board */ >> >> @@ -127,4 +129,26 @@ >> nvidia,tegra-core-regulator; >> }; >> }; >> + >> + cpus { >> + cpu0: cpu@0 { >> + cpu-supply = <&vddctrl_reg>; >> + operating-points-v2 = <&cpu0_opp_table>; >> + }; >> + >> + cpu@1 { >> + cpu-supply = <&vddctrl_reg>; >> + operating-points-v2 = <&cpu0_opp_table>; >> + }; >> + >> + cpu@2 { >> + cpu-supply = <&vddctrl_reg>; >> + operating-points-v2 = <&cpu0_opp_table>; >> + }; >> + >> + cpu@3 { >> + cpu-supply = <&vddctrl_reg>; >> + operating-points-v2 = <&cpu0_opp_table>; >> + }; >> + }; >> }; > > Sorry for not testing this sooner, but this is generating the > following WARNING on boot ... > > [ 2.916019] ------------[ cut here ]------------ > [ 2.920669] WARNING: CPU: 2 PID: 1 at /dvs/git/dirty/git-master_l4t-upstream/kernel/drivers/opp/of.c:688 _of_add_opp_table_v2.part.2+0x45c/0x4d4 > [ 2.933713] Modules linked in: > [ 2.936785] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 5.4.0-rc7-next-20191112-gfc6d6db1df2c #1 > [ 2.945403] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree) > [ 2.951706] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) > [ 2.959467] [] (show_stack) from [] (dump_stack+0xc0/0xd4) > [ 2.966707] [] (dump_stack) from [] (__warn+0xe0/0xf8) > [ 2.973593] [] (__warn) from [] (warn_slowpath_fmt+0xb0/0xb8) > [ 2.981090] [] (warn_slowpath_fmt) from [] (_of_add_opp_table_v2.part.2+0x45c/0x4d4) > [ 2.990583] [] (_of_add_opp_table_v2.part.2) from [] (dev_pm_opp_of_add_table+0x40/0x15c) > [ 3.000508] [] (dev_pm_opp_of_add_table) from [] (dev_pm_opp_of_cpumask_add_table+0x34/0xb4) > [ 3.010704] [] (dev_pm_opp_of_cpumask_add_table) from [] (cpufreq_init+0xf8/0x2cc) > [ 3.020024] [] (cpufreq_init) from [] (cpufreq_online+0x260/0x824) > [ 3.027953] [] (cpufreq_online) from [] (cpufreq_add_dev+0x6c/0x78) > [ 3.035976] [] (cpufreq_add_dev) from [] (subsys_interface_register+0xa0/0xec) > [ 3.044951] [] (subsys_interface_register) from [] (cpufreq_register_driver+0x14c/0x20c) > [ 3.054792] [] (cpufreq_register_driver) from [] (dt_cpufreq_probe+0x94/0x114) > [ 3.063771] [] (dt_cpufreq_probe) from [] (platform_drv_probe+0x48/0x98) > [ 3.072225] [] (platform_drv_probe) from [] (really_probe+0x234/0x34c) > [ 3.080502] [] (really_probe) from [] (driver_probe_device+0x60/0x168) > [ 3.088780] [] (driver_probe_device) from [] (device_driver_attach+0x58/0x60) > [ 3.097664] [] (device_driver_attach) from [] (__driver_attach+0x80/0xbc) > [ 3.106200] [] (__driver_attach) from [] (bus_for_each_dev+0x74/0xb4) > [ 3.114389] [] (bus_for_each_dev) from [] (bus_add_driver+0x164/0x1e8) > [ 3.122666] [] (bus_add_driver) from [] (driver_register+0x7c/0x114) > [ 3.130774] [] (driver_register) from [] (do_one_initcall+0x54/0x2a8) > [ 3.138974] [] (do_one_initcall) from [] (kernel_init_freeable+0x14c/0x1e8) > [ 3.147695] [] (kernel_init_freeable) from [] (kernel_init+0x8/0x10c) > [ 3.155887] [] (kernel_init) from [] (ret_from_fork+0x14/0x2c) > [ 3.163462] Exception stack(0xef0c9fb0 to 0xef0c9ff8) > [ 3.168519] 9fa0: 00000000 00000000 00000000 00000000 > [ 3.176706] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 > [ 3.184893] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000 > [ 3.191695] ---[ end trace a7dc36f7a4ddbdb2 ]--- > [ 3.197855] ------------[ cut here ]------------ > > Let me know if you can take a look at this. The warning happens because Cardhu now has CPU OPPs in the device-tree, but supported_hw isn't set for the OPPs and thus the count of available OPPs is 0. This is expected to happen because patch "cpufreq: tegra20: Use generic cpufreq-dt driver (Tegra30 supported now)" isn't applied yet. It is possible to factor out the blacklisting of Tegra SoCs in cpufreq_dt_platdev_init() into a separate patch and request backporting of that change in order to avoid the warning noise for older kernel versions + newer device-tree. Please let me know if you think that it's worth to do the separation.