• Quentin Perret's avatar
    cpufreq: Specify default governor on command line · 8412b456
    Quentin Perret authored
    Currently, the only way to specify the default CPUfreq governor is
    via Kconfig options, which suits users who can build the kernel
    themselves perfectly.
    
    However, for those who use a distro-like kernel (such as Android,
    with the Generic Kernel Image project), the only way to use a
    non-default governor is to boot to userspace, and to then switch
    using the sysfs interface. Being able to specify the default governor
    on the command line, like is the case for cpuidle, would allow those
    users to specify their governor of choice earlier on, and to simplify
    the userspace boot procedure slighlty.
    
    To support this use-case, add a kernel command line parameter
    allowing the default governor for CPUfreq to be specified, which
    takes precedence over the built-in default.
    
    This implementation has one notable limitation: the default governor
    must be registered before the driver. This is solved for builtin
    governors and drivers using appropriate *_initcall() functions. And
    in the modular case, this must be reflected as a constraint on the
    module loading order.
    Signed-off-by: default avatarQuentin Perret <qperret@google.com>
    [ Viresh: Converted 'default_governor' to a string and parsing it only
    	  at initcall level, and several updates to
    	  cpufreq_init_policy(). ]
    Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
    [ rjw: Changelog ]
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    8412b456
cpufreq.rst 33.3 KB