Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'pm-cpufreq'

* pm-cpufreq:
cpufreq / intel_pstate: Add kernel command line option disable intel_pstate.
cpufreq / intel_pstate: Change to disallow module build

+22 -6
+5
Documentation/kernel-parameters.txt
··· 1131 1131 0 disables intel_idle and fall back on acpi_idle. 1132 1132 1 to 6 specify maximum depth of C-state. 1133 1133 1134 + intel_pstate= [X86] 1135 + disable 1136 + Do not enable intel_pstate as the default 1137 + scaling driver for the supported processors 1138 + 1134 1139 intremap= [X86-64, Intel-IOMMU] 1135 1140 on enable Interrupt Remapping (default) 1136 1141 off disable Interrupt Remapping
+1 -6
drivers/cpufreq/Kconfig.x86
··· 3 3 # 4 4 5 5 config X86_INTEL_PSTATE 6 - tristate "Intel P state control" 6 + bool "Intel P state control" 7 7 depends on X86 8 8 help 9 9 This driver provides a P state for Intel core processors. ··· 12 12 13 13 When this driver is enabled it will become the perferred 14 14 scaling driver for Sandy bridge processors. 15 - 16 - Note: This driver should be built with the same settings as 17 - the other scaling drivers configured into the system 18 - (module/built-in) in order for the driver to register itself 19 - as the scaling driver on the system. 20 15 21 16 If in doubt, say N. 22 17
+16
drivers/cpufreq/intel_pstate.c
··· 773 773 } 774 774 module_exit(intel_pstate_exit); 775 775 776 + static int __initdata no_load; 777 + 776 778 static int __init intel_pstate_init(void) 777 779 { 778 780 int rc = 0; 779 781 const struct x86_cpu_id *id; 782 + 783 + if (no_load) 784 + return -ENODEV; 780 785 781 786 id = x86_match_cpu(intel_pstate_cpu_ids); 782 787 if (!id) ··· 806 801 return -ENODEV; 807 802 } 808 803 device_initcall(intel_pstate_init); 804 + 805 + static int __init intel_pstate_setup(char *str) 806 + { 807 + if (!str) 808 + return -EINVAL; 809 + 810 + if (!strcmp(str, "disable")) 811 + no_load = 1; 812 + return 0; 813 + } 814 + early_param("intel_pstate", intel_pstate_setup); 809 815 810 816 MODULE_AUTHOR("Dirk Brandewie <dirk.j.brandewie@intel.com>"); 811 817 MODULE_DESCRIPTION("'intel_pstate' - P state driver Intel Core processors");