[PATCH] Add support for type argument in PAL_GET_PSTATE
PAL_GET_PSTATE accepts a type argument to return different kinds of frequency information. Refer: Intel ItaniumArchitecture Software Developer's Manual - Volume 2: System Architecture, Revision 2.2 (http://developer.intel.com/design/itanium/manuals/245318.htm) Add the support for type argument and use Instantaneous frequency in the acpi driver. Also fix a bug, where in return value of PAL_GET_PSTATE was getting compared with 'control' bits instead of 'status' bits. Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
This commit is contained in:
committed by
Tony Luck
parent
6dbfc19b7e
commit
17e77b1cc3
@@ -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)
|
||||
@@ -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;
|
||||
@@ -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) {
|
||||
|
Reference in New Issue
Block a user