diff options
Diffstat (limited to 'arch/ia64/kernel/cpufreq/acpi-cpufreq.c')
-rw-r--r-- | arch/ia64/kernel/cpufreq/acpi-cpufreq.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/arch/ia64/kernel/cpufreq/acpi-cpufreq.c b/arch/ia64/kernel/cpufreq/acpi-cpufreq.c index 86faf221a070..088f130197ae 100644 --- a/arch/ia64/kernel/cpufreq/acpi-cpufreq.c +++ b/arch/ia64/kernel/cpufreq/acpi-cpufreq.c | |||
@@ -68,7 +68,8 @@ processor_get_pstate ( | |||
68 | 68 | ||
69 | dprintk("processor_get_pstate\n"); | 69 | dprintk("processor_get_pstate\n"); |
70 | 70 | ||
71 | retval = ia64_pal_get_pstate(&pstate_index); | 71 | retval = ia64_pal_get_pstate(&pstate_index, |
72 | PAL_GET_PSTATE_TYPE_INSTANT); | ||
72 | *value = (u32) pstate_index; | 73 | *value = (u32) pstate_index; |
73 | 74 | ||
74 | if (retval) | 75 | if (retval) |
@@ -91,7 +92,7 @@ extract_clock ( | |||
91 | dprintk("extract_clock\n"); | 92 | dprintk("extract_clock\n"); |
92 | 93 | ||
93 | for (i = 0; i < data->acpi_data.state_count; i++) { | 94 | for (i = 0; i < data->acpi_data.state_count; i++) { |
94 | if (value >= data->acpi_data.states[i].control) | 95 | if (value == data->acpi_data.states[i].status) |
95 | return data->acpi_data.states[i].core_frequency; | 96 | return data->acpi_data.states[i].core_frequency; |
96 | } | 97 | } |
97 | return data->acpi_data.states[i-1].core_frequency; | 98 | return data->acpi_data.states[i-1].core_frequency; |
@@ -117,11 +118,7 @@ processor_get_freq ( | |||
117 | goto migrate_end; | 118 | goto migrate_end; |
118 | } | 119 | } |
119 | 120 | ||
120 | /* | 121 | /* processor_get_pstate gets the instantaneous frequency */ |
121 | * processor_get_pstate gets the average frequency since the | ||
122 | * last get. So, do two PAL_get_freq()... | ||
123 | */ | ||
124 | ret = processor_get_pstate(&value); | ||
125 | ret = processor_get_pstate(&value); | 122 | ret = processor_get_pstate(&value); |
126 | 123 | ||
127 | if (ret) { | 124 | if (ret) { |