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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 26 Apr 2013 16:39:51 -0700
From:	Olof Johansson <olof@...om.net>
To:	Mike Turquette <mturquette@...aro.org>
Cc:	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	Olof Johansson <olof@...om.net>
Subject: [PATCH] clk: add option to keep boot clocks on

This is primarily useful when there's a driver that doesn't claim clocks
properly, but the bootloader does. It's not expected to be used in normal
cases, but for bringup and debug it's very useful to have the option to
not gate unclaimed clocks that are still on.

Signed-off-by: Olof Johansson <olof@...om.net>
---

Mike, this is a pretty trivial patch that I would love to see in 3.10
even though it's getting late. I'm definitely not picky about the naming
of the boot option, so feel free to change it.


-Olof

 drivers/clk/clk.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 20ce67f..b22551e 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -499,10 +499,24 @@ out:
 	return;
 }
 
+
+static bool keep_boot_clocks;
+static int __init clk_keep_boot_clocks(char *__unused)
+{
+	keep_boot_clocks = true;
+	return 1;
+}
+__setup("clk_keep_boot_clocks", clk_keep_boot_clocks);
+
 static int clk_disable_unused(void)
 {
 	struct clk *clk;
 
+	if (keep_boot_clocks) {
+		pr_warn("clk: Not disabling unused clocks\n");
+		return 0;
+	}
+
 	clk_prepare_lock();
 
 	hlist_for_each_entry(clk, &clk_root_list, child_node)
-- 
1.8.1.192.gc4361b8

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ