Subject: Re: [POWERPC] pasemi: Move pasemi_idle_init() to late_initcall()

From: Olof Johansson <[email-masked]>
Date: Mon, 10 Sep 2007 11:00:52 -0500

On Mon, Sep 10, 2007 at 10:44:43AM -0500, Nathan Lynch wrote:
> Olof Johansson wrote:
> > commit 6a30bd1e2160e921a8fb051b472dfaf068f4f386
> > Author: Olof Johansson <[email-masked]>
> > Date:   Tue Sep 4 21:53:30 2007 -0500
> > 
> >     [POWERPC] pasemi: Move pasemi_idle_init() to late_initcall()
> >     
> >     Move pasemi_idle_init() to be a late_initcall instead of being called from
> >     setup_arch(). This way the cpufreq driver has a chance to initialize and
> >     save away the boot time astate before we go to idle for the first time.
> 
> The patch looks fine, but while I was reviewing this I noticed that
> the pasemi cpufreq code is bool in Kconfig, but it has stuff like
> module_init() etc in it.  It's not hurting anything, but it did
> temporarily make me wonder "what happens if the cpufreq driver is
> modular"?

Good point. I actually kept it from being modular for the very reason
that it's needed in the idle loop to restore the cpu frequency when
coming out of power savings modes.

The whole idle/cpufreq dependencies should be overhauled at some point,
to avoid this, or at least allow the cpufreq driver to be a module
(and make idle default to spin when it's not loaded).

-Olof