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=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 79522C17440 for ; Sat, 9 Nov 2019 06:12:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4D7EC21882 for ; Sat, 9 Nov 2019 06:12:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=goldelico.com header.i=@goldelico.com header.b="l+i9vlzk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726301AbfKIGMp (ORCPT ); Sat, 9 Nov 2019 01:12:45 -0500 Received: from mo4-p01-ob.smtp.rzone.de ([81.169.146.166]:20607 "EHLO mo4-p01-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725861AbfKIGMp (ORCPT ); Sat, 9 Nov 2019 01:12:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1573279960; s=strato-dkim-0002; d=goldelico.com; h=To:References:Message-Id:Cc:Date:In-Reply-To:From:Subject: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=WMmQ4+DDSXPayYeZHO1v0pTuWaWEXdBQOD1L/vQ0wYA=; b=l+i9vlzk/nMiXGRdVTjf4uGSQhUhlSbzC9STtdSCZci0loeTcwOn7NLRntAmBwHWNj xKzhI18e/EGIqBDsI7vNKxivhNXDkkDoxUhmAbGjKJzouLJzjDdig+IxUf4tyYqDbWh3 m68kSMHcFh0dn9BsZZvCR1Vxg3qA9cINC4wja2WtjDfLZSMGKC5duL/pb4JKCyZExrhl am2abfFnVSz1Ra1RCYRIj5S4KD/1ZjjjryrAHnmHCfZJzEaPFd+5IbevRBUvJeb0auJJ 9TLfYSD1Zhm0HEVQbNHWopQNjQuvUuwoIMBxKdtU+2Vp6gPhtXn7WBfPtgkFIVXmRekj 5Xhg== X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMgPgp8VKxflSZ1P34KBj7wpz8NMGH/PrwDOi71s=" X-RZG-CLASS-ID: mo00 Received: from imac.fritz.box by smtp.strato.de (RZmta 44.29.0 DYNA|AUTH) with ESMTPSA id L09db3vA96CMnPU (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Sat, 9 Nov 2019 07:12:22 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: [PATCH v3 0/8] OMAP3: convert opp-v1 to opp-v2 and read speed binned / 720MHz grade bits From: "H. Nikolaus Schaller" In-Reply-To: Date: Sat, 9 Nov 2019 07:12:22 +0100 Cc: =?utf-8?Q?Beno=C3=AEt_Cousson?= , Tony Lindgren , Rob Herring , =?utf-8?Q?Andr=C3=A9_Roth?= , Mark Rutland , "Rafael J. Wysocki" , Viresh Kumar , Enric Balletbo i Serra , Javier Martinez Canillas , Roger Quadros , Teresa Remmet , Linux-OMAP , devicetree , Linux Kernel Mailing List , linux-pm@vger.kernel.org, Discussions about the Letux Kernel , kernel@pyra-handheld.com, arm-soc Content-Transfer-Encoding: quoted-printable Message-Id: <4F6078BD-0759-4B47-933E-E29EE1D8AD18@goldelico.com> References: To: Adam Ford X-Mailer: Apple Mail (2.3124) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Adam, > Am 08.11.2019 um 21:08 schrieb Adam Ford : >=20 >=20 > Nikolaus, >=20 > I am getting some notices sent to me when I apply your series. It > works, but I want to clean up the notice. Can you suggest what might > cause this: >=20 > debugfs: Directory 'cpu0-cpu0' with parent > '48070000.i2c:twl@48:regulator-vdd1-VDD1' already present! >=20 > It wasn't present before your series. It's not a big deal, but I'd > like to quiet down the messages if I can. > Thanks. I have checked and can also see this message - and it should be removed. There is a debugfs node at: = /sys/kernel/debug/regulator/48070000.i2c:twl@48:regulator-vdd1-VDD1/cpu0-c= pu0 OMAP5 also has a similar node but no such debugfs warning: /sys/kernel/debug/regulator/smps123/cpu0-cpu0 So what I suspect is some bug in the twl4030 regulator driver which is just revealed by my patch series for the first time. Could it be that the debugfs node is created and not cleaned up by = deferred probing? But this is not explicitly done in drivers/regulator/twl-regulator.c BTW: twl6030 and palmas (twl6037) have separate driver, so that = mentioning twl6030 in the comments in drivers/regulator/twl-regulator.c may be = wrong. It also mentions some "TW5030" which I have never heard of. To find out the call sequence I added a dump_stack to start_creating() after the error message is printed: [ 2.289947] debugfs: Directory 'cpu0-cpu0' with parent = '48070000.i2c:twl@48:regulator-vdd1-VDD1' already present! [ 2.301727] CPU: 0 PID: 1 Comm: swapper/0 Not tainted = 5.4.0-rc6-letux+ #1329 [ 2.309112] Hardware name: Generic OMAP36xx (Flattened Device Tree) [ 2.315734] [] (unwind_backtrace) from [] = (show_stack+0x10/0x14) [ 2.323852] [] (show_stack) from [] = (dump_stack+0x7c/0x9c) [ 2.331420] [] (dump_stack) from [] = (start_creating+0xa8/0x104) [ 2.339477] [] (start_creating) from [] = (debugfs_create_dir+0xc/0xc0) [ 2.348052] [] (debugfs_create_dir) from [] = (create_regulator+0xd0/0x1c8) [ 2.356994] [] (create_regulator) from [] = (_regulator_get+0x190/0x224) [ 2.365661] [] (_regulator_get) from [] = (dt_cpufreq_probe+0x80/0x108) [ 2.374237] [] (dt_cpufreq_probe) from [] = (platform_drv_probe+0x48/0x98) [ 2.383087] [] (platform_drv_probe) from [] = (really_probe+0x164/0x324) [ 2.391754] [] (really_probe) from [] = (driver_probe_device+0x10c/0x154) [ 2.400512] [] (driver_probe_device) from [] = (bus_for_each_drv+0x90/0xb8) [ 2.409423] [] (bus_for_each_drv) from [] = (__device_attach+0x90/0x120) [ 2.418090] [] (__device_attach) from [] = (bus_probe_device+0x28/0x80) [ 2.426666] [] (bus_probe_device) from [] = (device_add+0x2f0/0x55c) [ 2.434967] [] (device_add) from [] = (platform_device_add+0x12c/0x1b8) [ 2.443542] [] (platform_device_add) from [] = (platform_device_register_full+0xec/0x13c) [ 2.453765] [] (platform_device_register_full) from = [] (ti_cpufreq_probe+0x298/0x2fc) [ 2.463775] [] (ti_cpufreq_probe) from [] = (platform_drv_probe+0x48/0x98) [ 2.472625] [] (platform_drv_probe) from [] = (really_probe+0x164/0x324) [ 2.481292] [] (really_probe) from [] = (driver_probe_device+0x10c/0x154) [ 2.490051] [] (driver_probe_device) from [] = (bus_for_each_drv+0x90/0xb8) [ 2.498992] [] (bus_for_each_drv) from [] = (__device_attach+0x90/0x120) [ 2.507629] [] (__device_attach) from [] = (bus_probe_device+0x28/0x80) [ 2.516204] [] (bus_probe_device) from [] = (device_add+0x2f0/0x55c) [ 2.524505] [] (device_add) from [] = (platform_device_add+0x12c/0x1b8) [ 2.533081] [] (platform_device_add) from [] = (platform_device_register_full+0xec/0x13c) [ 2.543304] [] (platform_device_register_full) from = [] (ti_cpufreq_init+0x78/0xa8) [ 2.553039] [] (ti_cpufreq_init) from [] = (do_one_initcall+0xb4/0x268) [ 2.561645] [] (do_one_initcall) from [] = (kernel_init_freeable+0x11c/0x1ec) [ 2.570770] [] (kernel_init_freeable) from [] = (kernel_init+0x8/0x110) [ 2.579345] [] (kernel_init) from [] = (ret_from_fork+0x14/0x2c) [ 2.587249] Exception stack(0xde0b1fb0 to 0xde0b1ff8) [ 2.592559] 1fa0: 00000000 = 00000000 00000000 00000000 [ 2.601135] 1fc0: 00000000 00000000 00000000 00000000 00000000 = 00000000 00000000 00000000 [ 2.609680] 1fe0: 00000000 00000000 00000000 00000000 00000013 = 00000000 So the problem seems to be that ti_cpufreq_probe() tries to register the = regulators "vdd" and "vbb" without properly checking if they have been registered = elsewhere. The second attempt to create the debugfs directory seems to come from = resources_available() which thinks that it has to create the regulator (again) [around line = 1935 in drivers/regulator/core.c]. Hope this helps, although I have no idea why the vdd regulator already = exists at that point. BR, Nikolaus