Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4580227ybc; Fri, 15 Nov 2019 06:57:07 -0800 (PST) X-Google-Smtp-Source: APXvYqzoAlSRAzSADldF8p7ndFQmOej7NgO/qXyQALxtmyEwXQOwTm0+6H9GTTCtxpqxRpotbPE3 X-Received: by 2002:a17:906:7691:: with SMTP id o17mr1401156ejm.323.1573829827617; Fri, 15 Nov 2019 06:57:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573829827; cv=none; d=google.com; s=arc-20160816; b=RD1X9qrd8hYyu5DJTqO3u1Hd3XFkikIACbrywPgtjGynaQXToymZ7asZHAHGCXbBXq 2faVGqglJ1sFuQhUaetZMlTFEqAMwouR0Am2Nfagj25Cql1RiI4oY2IdKZj4pDQC4hyY C/+dkTdX7bCPLWcZ0FCRx5fyWReOtCMBv4SqVzHFJZlTiVb6lyV5MxucawfHfNvEfSA/ ilI+MTXNKMBDkXwJ4ngVVt8M024zukfI2RX3Cn06uqh4Nru+a4s8m7c6ZTVtVpd9ZitV xze81e8ETwtsYU99YS3ab5Kl4Ejc/kRiwv4rLVDXY4EPlQPXkG+DQsPfpsX0+RAEnK6m 57tQ== 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=wVQxG2BiztzSwM3KfGoVbwyCoQTakGKYV/pOVNlceF8=; b=STnFcUIoG9E+hdab6/fO4pIGHos4Th7dxTc/1abhR8rIjvo37MQyNdHuCvAWhS5SEo fFj6q+vgf6aroezFcKU/vsecGBT0oyckmoru8TxsdqSnyWK/eqt1Gn7AsCJ7VvJ2OcEb 0dnisoAGI/vCTz+fgrrd3zMpV7mQCygNUtpc9dpI0CAvgAL5hKFTOwh/5IH3tv30C4oK 6YA2YL1ptG8fRE1KOd+C8X9MJ1SxN9uwVdvxeKcVdb6nMdxRhG+Ebjxm+lE30lmdUEyK RHApAUa86CNUXq2ouG8JR3BIxCv5MOfb4ox4ePZMi0sGF3kHqsNJLO27gkjsRFixn2jy 3BXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=j29J5gGE; 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 b13si5891697eja.112.2019.11.15.06.56.43; Fri, 15 Nov 2019 06:57:07 -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=j29J5gGE; 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 S1727751AbfKOOzi (ORCPT + 99 others); Fri, 15 Nov 2019 09:55:38 -0500 Received: from mail-lf1-f68.google.com ([209.85.167.68]:41898 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727577AbfKOOzi (ORCPT ); Fri, 15 Nov 2019 09:55:38 -0500 Received: by mail-lf1-f68.google.com with SMTP id j14so8220439lfb.8; Fri, 15 Nov 2019 06:55:36 -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=wVQxG2BiztzSwM3KfGoVbwyCoQTakGKYV/pOVNlceF8=; b=j29J5gGEaIVTPS5bGn1MxfaTslEQCSW3ATpaV4k8wS0CrD/IJrjIoG2UNl71tyxNR6 rmelP856C9QaKbYUOeBGHx7PvToYTeXT7fqTO0mpV8YU1jNLcUGdlJc4v0YdZevDqNsA ct6UBWHN5iVfuxv46A/rPOx915BFf9lF1pg8UWxVi8S+86UNOyPB6P7DT/GC4Nm2q5lt ELypeOyLknBzik2qBYBbRZ6vCdzUAMeolNew1GKEuGKF3hChMqXCWAuTo7c7n6E19cUD ylo4PISrD/u9ONGfRAOHsBhoOZM/QpIPm/2baJ8PmBCpFAVWVENiu0T107yGQ0lniKVX cAOA== 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=wVQxG2BiztzSwM3KfGoVbwyCoQTakGKYV/pOVNlceF8=; b=YPtF+cO80J1MWxoWSfFYNIonxhi782F8YZJl6dJE80gYubX7aLmc6w3BZs56MCngWX amuqaMT0P9cYo4tFks69EQWREa5fjB5RDcpqmlr9pIapOedD0NnL5SxyvKEJEzZfYyxp cn/g95FEBN5evnPsJbq3i9BzeDwkQtlivdIdyn1yq2S8RBTQkpY9rYunCFmMcwdTjU9v yl/LUV2V9+vn+60pcN6lMaqokZ02vQ8c3R2L697Y2A2ZikUZd0BjjgNBpBeYs1lkY7NR y+NGnzq7OXhG1N+4m7vzTJEupaDKt03+/bUjKW5MGBGWkpXMxYB7X/4e/mxZbS6MetE/ /G7w== X-Gm-Message-State: APjAAAVFQ3A8KYsOpc8r5VG72P/XGyr3xAxUTUDqNoLBAHDnEY5n9Lng C2QxC+G18dqTOt9ulAoYkwU3IT5P X-Received: by 2002:a19:8092:: with SMTP id b140mr11428544lfd.13.1573829735117; Fri, 15 Nov 2019 06:55:35 -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 r4sm3989537ljn.64.2019.11.15.06.55.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Nov 2019 06:55:34 -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> <8974f1a8-72bb-4413-d2b5-057853696fb4@gmail.com> From: Dmitry Osipenko Message-ID: <15962ea4-20a8-0bf9-6982-f94123b9a324@gmail.com> Date: Fri, 15 Nov 2019 17:55:32 +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 15.11.2019 15:52, Jon Hunter пишет: > > On 13/11/2019 13:57, Dmitry Osipenko wrote: >> 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. > > Unfortunately, I think we are going to need to drop this patch. Booting > Tegra30-cardhu-a04 with Thierry's for-5.5/arm/dt branch does not even > boot. There is no crash log but it hangs on boot. This patch appears to > be the culprit. What is odd is that Tegra30-cardhu-a04 boots fine with > Thierry's for-next branch which includes this. However, this is causing > lots of bisect problems. Updating the DT shouldn't break the boot. The diff between "for-5.5/arm/dt" and "for-next" is quite small, you only need to try to revert one or two patches. Seems the only major change which could be somehow related to CPUFreq is that "for-5.5/arm/dt" doesn't have regulators coupling support, but I don't see how it could cause any effect since CPUFreq just doesn't load due to a missing setup of supported_hw. Unfortunately for now I can't reproduce the hang with a similar setup that has OPPs in DT, doesn't have Tegra CPUFreq driver, doesn't blacklist Tegra in cpufreq-dt-platdev.c and doesn't have regulators coupling. I see the warning splats on boot and everything appears to be working fine. It's likely that the hang is caused by something else than this patch. It's also a bit odd that you're accusing this patch while apparently it worked a day before. Please give a try to the recent upstream linux-next. If it works, then probably there is nothing to worry about. I'll factor out the blacklisting change and add it as a separate patch into the next revision of the series, marking the patch as "fixes" and "stable" in order to get rid of the warning on stable kernels. I'm also fine with reverting of the DT changes for now, if you prefer that. But again, this DT change shouldn't cause any critical problems. I need a detailed report or a way to reproduce the problem in order to solve it, please try to collect some more details. Try to compile the cpufreq-dt driver as a loadable module, enable tracing of clk and regulator events (tp_printk trace_event=regulator_set_voltage,clk_set_rate,clk_set_parent).