Commit 95a000be authored by Tim Gardner's avatar Tim Gardner

UBUNTU: SAUCE: (no-up) Allow filtering of cpufreq drivers

Harmless patch that allows k8 powernow machines to boot. Carry until
conflict.

BugLink: http://bugs.launchpad.net/bugs/984288Acked-by: default avatarStefan Bader <stefan.bader@canonical.com>
Acked-by: default avatarHerton Krzesinski <herton.krzesinski@canonical.com>
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
parent 64432187
......@@ -750,6 +750,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
/proc/<pid>/coredump_filter.
See also Documentation/filesystems/proc.txt.
cpufreq_driver= [X86] Allow only the named cpu frequency scaling driver
to register. Example: cpufreq_driver=powernow-k8
Format: { none | STRING }
cpuidle.off=1 [CPU_IDLE]
disable the cpuidle sub-system
......
......@@ -2392,6 +2392,20 @@ EXPORT_SYMBOL_GPL(cpufreq_boost_enabled);
* REGISTER / UNREGISTER CPUFREQ DRIVER *
*********************************************************************/
static char cpufreq_driver_name[CPUFREQ_NAME_LEN];
static int __init cpufreq_driver_setup(char *str)
{
strlcpy(cpufreq_driver_name, str, CPUFREQ_NAME_LEN);
return 1;
}
/*
* Set this name to only allow one specific cpu freq driver, e.g.,
* cpufreq_driver=powernow-k8
*/
__setup("cpufreq_driver=", cpufreq_driver_setup);
/**
* cpufreq_register_driver - register a CPU Frequency driver
* @driver_data: A struct cpufreq_driver containing the values#
......@@ -2418,7 +2432,13 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
(!!driver_data->get_intermediate != !!driver_data->target_intermediate))
return -EINVAL;
pr_debug("trying to register driver %s\n", driver_data->name);
pr_debug("trying to register driver %s, cpufreq_driver=%s\n",
driver_data->name, cpufreq_driver_name);
if (cpufreq_driver_name[0])
if (!driver_data->name ||
strcmp(cpufreq_driver_name, driver_data->name))
return -EINVAL;
/* Protect against concurrent CPU online/offline. */
get_online_cpus();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment