Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43337
b: refs/heads/master
c: 17e77b1
h: refs/heads/master
i:
  43335: b419241
v: v3
  • Loading branch information
Venkatesh Pallipadi authored and Tony Luck committed Dec 7, 2006
1 parent 9dbdff0 commit c8de708
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6dbfc19b7ea93f94f1efabaae71a921b49d8cae2
refs/heads/master: 17e77b1cc31454908aa286bb1db3c611295ce25c
11 changes: 4 additions & 7 deletions trunk/arch/ia64/kernel/cpufreq/acpi-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ processor_get_pstate (

dprintk("processor_get_pstate\n");

retval = ia64_pal_get_pstate(&pstate_index);
retval = ia64_pal_get_pstate(&pstate_index,
PAL_GET_PSTATE_TYPE_INSTANT);
*value = (u32) pstate_index;

if (retval)
Expand All @@ -91,7 +92,7 @@ extract_clock (
dprintk("extract_clock\n");

for (i = 0; i < data->acpi_data.state_count; i++) {
if (value >= data->acpi_data.states[i].control)
if (value == data->acpi_data.states[i].status)
return data->acpi_data.states[i].core_frequency;
}
return data->acpi_data.states[i-1].core_frequency;
Expand All @@ -117,11 +118,7 @@ processor_get_freq (
goto migrate_end;
}

/*
* processor_get_pstate gets the average frequency since the
* last get. So, do two PAL_get_freq()...
*/
ret = processor_get_pstate(&value);
/* processor_get_pstate gets the instantaneous frequency */
ret = processor_get_pstate(&value);

if (ret) {
Expand Down
9 changes: 7 additions & 2 deletions trunk/include/asm-ia64/pal.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@
#define PAL_SET_PSTATE 263 /* set the P-state */
#define PAL_BRAND_INFO 274 /* Processor branding information */

#define PAL_GET_PSTATE_TYPE_LASTSET 0
#define PAL_GET_PSTATE_TYPE_AVGANDRESET 1
#define PAL_GET_PSTATE_TYPE_AVGNORESET 2
#define PAL_GET_PSTATE_TYPE_INSTANT 3

#ifndef __ASSEMBLY__

#include <linux/types.h>
Expand Down Expand Up @@ -1141,10 +1146,10 @@ ia64_pal_halt_info (pal_power_mgmt_info_u_t *power_buf)

/* Get the current P-state information */
static inline s64
ia64_pal_get_pstate (u64 *pstate_index)
ia64_pal_get_pstate (u64 *pstate_index, unsigned long type)
{
struct ia64_pal_retval iprv;
PAL_CALL_STK(iprv, PAL_GET_PSTATE, 0, 0, 0);
PAL_CALL_STK(iprv, PAL_GET_PSTATE, type, 0, 0);
*pstate_index = iprv.v0;
return iprv.status;
}
Expand Down

0 comments on commit c8de708

Please sign in to comment.