lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230918-imx8mp-dtsi-v1-4-1d008b3237c0@skidata.com>
Date:   Mon, 18 Sep 2023 00:40:00 +0200
From:   Benjamin Bara <bbara93@...il.com>
To:     Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Conor Dooley <conor+dt@...nel.org>,
        Shawn Guo <shawnguo@...nel.org>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Pengutronix Kernel Team <kernel@...gutronix.de>,
        Fabio Estevam <festevam@...il.com>,
        NXP Linux Team <linux-imx@....com>,
        Michael Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>,
        Russell King <linux@...linux.org.uk>,
        Abel Vesa <abelvesa@...nel.org>, Peng Fan <peng.fan@....com>
Cc:     Frank Oltmanns <frank@...manns.dev>,
        Maxime Ripard <mripard@...nel.org>, devicetree@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-clk@...r.kernel.org,
        Benjamin Bara <benjamin.bara@...data.com>
Subject: [PATCH 04/13] clk: print debug message if parent change is ignored

From: Benjamin Bara <benjamin.bara@...data.com>

Print a debug message if the determination of the best clock rate
suggests a re-config of the parent (which means the actual driver
considers doing so), but the clock is not configured with
CLK_SET_PARENT_RATE.

This should give a good hint for clock config improvement potential.

Signed-off-by: Benjamin Bara <benjamin.bara@...data.com>
---
 drivers/clk/clk.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 3e222802b712..4954d31899ce 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -2241,9 +2241,14 @@ static struct clk_core *clk_calc_new_rates(struct clk_core *core,
 		}
 	}
 
-	if ((core->flags & CLK_SET_RATE_PARENT) && parent &&
-	    best_parent_rate != parent->rate)
-		top = clk_calc_new_rates(parent, best_parent_rate);
+	if (parent && best_parent_rate != parent->rate) {
+		if (core->flags & CLK_SET_RATE_PARENT)
+			top = clk_calc_new_rates(parent, best_parent_rate);
+		else
+			pr_debug("%s: ignore parent %s re-config from %lu to %lu\n",
+				 core->name, parent->name, parent->rate,
+				 best_parent_rate);
+	}
 
 out:
 	clk_calc_subtree(core, new_rate, parent, p_index);

-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ