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>] [day] [month] [year] [list]
Message-ID: <20140826223637.GA5324@lunn.ch>
Date:	Wed, 27 Aug 2014 00:36:37 +0200
From:	Andrew Lunn <andrew@...n.ch>
To:	Mike Turquette <mturquette@...aro.org>
Cc:	Andrew Lunn <andrew@...n.ch>,
	Tomeu Vizoso <tomeu.vizoso@...labora.com>,
	Stephen Warren <swarren@...dotorg.org>,
	Viresh Kumar <viresh.kumar@...aro.org>,
	Peter De Schrijver <pdeschrijver@...dia.com>,
	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	linux-kernel@...r.kernel.org, Rabin Vincent <rabin@....in>,
	Tomasz Figa <t.figa@...sung.com>,
	Thierry Reding <thierry.reding@...il.com>,
	Javier Martinez Canillas <javier.martinez@...labora.co.uk>,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v7 3/8] cpufreq: kirkwood: Remove use of the clk provider
 API

> > Not quite true. u-boot might of touch the clock. Weird things happen
> > with some kirkwood boards. Some don't have the ability to control
> > there power supplies. So some boards implement "power off" by
> > rebooting, and letting u-boot spin until a button is pressed. I hope
> > such a u-boot powers off as much as possible, and e.g. drops the CPU
> > clock to the lower frequency. One would also hope it puts it back to
> > high speed before calling the kernel.
> 
> I have a doubt about this.
> 
> The powersave clock in drivers/clk/mvebu/kirkwood.c does not set
> CLK_IGNORE_UNUSED, nor do any of the clocks in kirkwood_gating_desc[].
> 
> So regardless of what U-boot does, if no driver has called clk_enable() on
> powersave_clk by late_initcall-time then clk_disable_unused() will
> disable it as a power-saving mechanism.
> 
> So are kirkwood systems that use cpufreq simply getting lucky and not
> hanging?

Hi Mike

Its a good question.

However, the reset value of the clock is off. off means the CPU is
running at its high speed. Turning this clock on, actually reduces the
clock speed! So for 99% of the time, the late_initcall does nothing.

It gets more interesting when uboot, or a previous kernel has turned
the clock on. I admit, i don't expect this to happen very often, but
if it does, and there is no cpufreq driver, interesting things could
happen. The cpufreq driver can only be builtin, not a module. So if it
is available, it should be guaranteed to claim the clock before the
late_initcall could turn it off. And since it reads the hardware
state, it will do the right thing.

       Andrew
--
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