diff options
author | Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> | 2006-12-01 18:28:14 -0500 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2006-12-07 14:21:55 -0500 |
commit | 17e77b1cc31454908aa286bb1db3c611295ce25c (patch) | |
tree | 8d4cae677dfec84d4f41a93b8758bad5b1b8761f /include/asm-ia64 | |
parent | 6dbfc19b7ea93f94f1efabaae71a921b49d8cae2 (diff) |
[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 Itanium�Architecture 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>
Diffstat (limited to 'include/asm-ia64')
-rw-r--r-- | include/asm-ia64/pal.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/asm-ia64/pal.h b/include/asm-ia64/pal.h index 308e94f6299e..bc768153f3c9 100644 --- a/include/asm-ia64/pal.h +++ b/include/asm-ia64/pal.h | |||
@@ -84,6 +84,11 @@ | |||
84 | #define PAL_SET_PSTATE 263 /* set the P-state */ | 84 | #define PAL_SET_PSTATE 263 /* set the P-state */ |
85 | #define PAL_BRAND_INFO 274 /* Processor branding information */ | 85 | #define PAL_BRAND_INFO 274 /* Processor branding information */ |
86 | 86 | ||
87 | #define PAL_GET_PSTATE_TYPE_LASTSET 0 | ||
88 | #define PAL_GET_PSTATE_TYPE_AVGANDRESET 1 | ||
89 | #define PAL_GET_PSTATE_TYPE_AVGNORESET 2 | ||
90 | #define PAL_GET_PSTATE_TYPE_INSTANT 3 | ||
91 | |||
87 | #ifndef __ASSEMBLY__ | 92 | #ifndef __ASSEMBLY__ |
88 | 93 | ||
89 | #include <linux/types.h> | 94 | #include <linux/types.h> |
@@ -1141,10 +1146,10 @@ ia64_pal_halt_info (pal_power_mgmt_info_u_t *power_buf) | |||
1141 | 1146 | ||
1142 | /* Get the current P-state information */ | 1147 | /* Get the current P-state information */ |
1143 | static inline s64 | 1148 | static inline s64 |
1144 | ia64_pal_get_pstate (u64 *pstate_index) | 1149 | ia64_pal_get_pstate (u64 *pstate_index, unsigned long type) |
1145 | { | 1150 | { |
1146 | struct ia64_pal_retval iprv; | 1151 | struct ia64_pal_retval iprv; |
1147 | PAL_CALL_STK(iprv, PAL_GET_PSTATE, 0, 0, 0); | 1152 | PAL_CALL_STK(iprv, PAL_GET_PSTATE, type, 0, 0); |
1148 | *pstate_index = iprv.v0; | 1153 | *pstate_index = iprv.v0; |
1149 | return iprv.status; | 1154 | return iprv.status; |
1150 | } | 1155 | } |