aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/processor_perflib.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/processor_perflib.c')
-rw-r--r--drivers/acpi/processor_perflib.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c
index b4749969c6b4..0133af49cf06 100644
--- a/drivers/acpi/processor_perflib.c
+++ b/drivers/acpi/processor_perflib.c
@@ -64,7 +64,13 @@ static DEFINE_MUTEX(performance_mutex);
64 * policy is adjusted accordingly. 64 * policy is adjusted accordingly.
65 */ 65 */
66 66
67static unsigned int ignore_ppc = 0; 67/* ignore_ppc:
68 * -1 -> cpufreq low level drivers not initialized -> _PSS, etc. not called yet
69 * ignore _PPC
70 * 0 -> cpufreq low level drivers initialized -> consider _PPC values
71 * 1 -> ignore _PPC totally -> forced by user through boot param
72 */
73static unsigned int ignore_ppc = -1;
68module_param(ignore_ppc, uint, 0644); 74module_param(ignore_ppc, uint, 0644);
69MODULE_PARM_DESC(ignore_ppc, "If the frequency of your machine gets wrongly" \ 75MODULE_PARM_DESC(ignore_ppc, "If the frequency of your machine gets wrongly" \
70 "limited by BIOS, this should help"); 76 "limited by BIOS, this should help");
@@ -72,7 +78,7 @@ MODULE_PARM_DESC(ignore_ppc, "If the frequency of your machine gets wrongly" \
72#define PPC_REGISTERED 1 78#define PPC_REGISTERED 1
73#define PPC_IN_USE 2 79#define PPC_IN_USE 2
74 80
75static int acpi_processor_ppc_status = 0; 81static int acpi_processor_ppc_status;
76 82
77static int acpi_processor_ppc_notifier(struct notifier_block *nb, 83static int acpi_processor_ppc_notifier(struct notifier_block *nb,
78 unsigned long event, void *data) 84 unsigned long event, void *data)
@@ -81,13 +87,18 @@ static int acpi_processor_ppc_notifier(struct notifier_block *nb,
81 struct acpi_processor *pr; 87 struct acpi_processor *pr;
82 unsigned int ppc = 0; 88 unsigned int ppc = 0;
83 89
84 if (ignore_ppc) 90 if (event == CPUFREQ_START && ignore_ppc <= 0) {
91 ignore_ppc = 0;
85 return 0; 92 return 0;
93 }
86 94
87 mutex_lock(&performance_mutex); 95 if (ignore_ppc)
96 return 0;
88 97
89 if (event != CPUFREQ_INCOMPATIBLE) 98 if (event != CPUFREQ_INCOMPATIBLE)
90 goto out; 99 return 0;
100
101 mutex_lock(&performance_mutex);
91 102
92 pr = per_cpu(processors, policy->cpu); 103 pr = per_cpu(processors, policy->cpu);
93 if (!pr || !pr->performance) 104 if (!pr || !pr->performance)