• Linus Torvalds's avatar
    Add "pure_initcall" for static variable initialization · b3438f82
    Linus Torvalds authored
    This is a quick hack to overcome the fact that SRCU currently does not
    allow static initializers, and we need to sometimes initialize those
    things before any other initializers (even "core" ones) can do so.
    
    Currently we don't allow this at all for modules, and the only user that
    needs is right now is cpufreq. As reported by Thomas Gleixner:
    
       "Commit b4dfdbb3 ("[PATCH] cpufreq:
        make the transition_notifier chain use SRCU breaks cpu frequency
        notification users, which register the callback > on core_init
        level."
    
    Cc: Thomas Gleixner <tglx@timesys.com>
    Cc: Ingo Molnar <mingo@elte.hu>
    Cc: Arjan van de Ven <arjan@infradead.org>
    Cc: Andrew Morton <akpm@osdl.org>,
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    b3438f82
cpufreq.c 42.6 KB