• Viresh Kumar's avatar
    cpufreq: Remove CPUFREQ_STICKY flag · 5ae4a4b4
    Viresh Kumar authored
    During cpufreq driver's registration, if the ->init() callback for all
    the CPUs fail then there is not much point in keeping the driver around
    as it will only account for more of unnecessary noise, for example
    cpufreq core will try to suspend/resume the driver which never got
    registered properly.
    
    The removal of such a driver is avoided if the driver carries the
    CPUFREQ_STICKY flag. This was added way back [1] in 2004 and perhaps no
    one should ever need it now. A lot of drivers do set this flag, probably
    because they just copied it from other drivers.
    
    This was added earlier for some platforms [2] because their cpufreq
    drivers were getting registered before the CPUs were registered with
    subsys framework. And hence they used to fail.
    
    The same isn't true anymore though. The current code flow in the kernel
    is:
    
    start_kernel()
    -> kernel_init()
       -> kernel_init_freeable()
          -> do_basic_setup()
             -> driver_init()
                -> cpu_dev_init()
                   -> su...
    5ae4a4b4
loongson1-cpufreq.c 5.52 KB