aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/intel_pstate.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cpufreq/intel_pstate.c')
-rw-r--r--drivers/cpufreq/intel_pstate.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index e87996355da0..096fde0ebcb5 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -773,11 +773,16 @@ static void intel_pstate_exit(void)
773} 773}
774module_exit(intel_pstate_exit); 774module_exit(intel_pstate_exit);
775 775
776static int __initdata no_load;
777
776static int __init intel_pstate_init(void) 778static int __init intel_pstate_init(void)
777{ 779{
778 int rc = 0; 780 int rc = 0;
779 const struct x86_cpu_id *id; 781 const struct x86_cpu_id *id;
780 782
783 if (no_load)
784 return -ENODEV;
785
781 id = x86_match_cpu(intel_pstate_cpu_ids); 786 id = x86_match_cpu(intel_pstate_cpu_ids);
782 if (!id) 787 if (!id)
783 return -ENODEV; 788 return -ENODEV;
@@ -802,6 +807,17 @@ out:
802} 807}
803device_initcall(intel_pstate_init); 808device_initcall(intel_pstate_init);
804 809
810static int __init intel_pstate_setup(char *str)
811{
812 if (!str)
813 return -EINVAL;
814
815 if (!strcmp(str, "disable"))
816 no_load = 1;
817 return 0;
818}
819early_param("intel_pstate", intel_pstate_setup);
820
805MODULE_AUTHOR("Dirk Brandewie <dirk.j.brandewie@intel.com>"); 821MODULE_AUTHOR("Dirk Brandewie <dirk.j.brandewie@intel.com>");
806MODULE_DESCRIPTION("'intel_pstate' - P state driver Intel Core processors"); 822MODULE_DESCRIPTION("'intel_pstate' - P state driver Intel Core processors");
807MODULE_LICENSE("GPL"); 823MODULE_LICENSE("GPL");