diff options
author | Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> | 2008-02-11 20:46:31 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-02-14 00:09:55 -0500 |
commit | 4fcb2fcd4d0678b8ae103d257dcb28074cbfc7fa (patch) | |
tree | 54bcf486976184804c8fc786d09a04e1ce26ef99 /include | |
parent | e760e716d47b48caf98da348368fd41b4a9b9e7e (diff) |
ACPI, cpuidle: Clarify C-state description in sysfs
Add a new sysfs entry under cpuidle states. desc - can be used by driver to
communicate to userspace any specific information about the state.
This helps in identifying the exact hardware C-states behind the ACPI C-state
definition.
Idea is to export this through powertop, which will help to map the C-state
reported by powertop to actual hardware C-state.
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/acpi/processor.h | 9 | ||||
-rw-r--r-- | include/linux/cpuidle.h | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index cdc8004cfd12..06480bcabfdc 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -32,9 +32,11 @@ | |||
32 | #define DOMAIN_COORD_TYPE_SW_ANY 0xfd | 32 | #define DOMAIN_COORD_TYPE_SW_ANY 0xfd |
33 | #define DOMAIN_COORD_TYPE_HW_ALL 0xfe | 33 | #define DOMAIN_COORD_TYPE_HW_ALL 0xfe |
34 | 34 | ||
35 | #define ACPI_CSTATE_SYSTEMIO (0) | 35 | #define ACPI_CSTATE_SYSTEMIO 0 |
36 | #define ACPI_CSTATE_FFH (1) | 36 | #define ACPI_CSTATE_FFH 1 |
37 | #define ACPI_CSTATE_HALT (2) | 37 | #define ACPI_CSTATE_HALT 2 |
38 | |||
39 | #define ACPI_CX_DESC_LEN 32 | ||
38 | 40 | ||
39 | /* Power Management */ | 41 | /* Power Management */ |
40 | 42 | ||
@@ -74,6 +76,7 @@ struct acpi_processor_cx { | |||
74 | u64 time; | 76 | u64 time; |
75 | struct acpi_processor_cx_policy promotion; | 77 | struct acpi_processor_cx_policy promotion; |
76 | struct acpi_processor_cx_policy demotion; | 78 | struct acpi_processor_cx_policy demotion; |
79 | char desc[ACPI_CX_DESC_LEN]; | ||
77 | }; | 80 | }; |
78 | 81 | ||
79 | struct acpi_processor_power { | 82 | struct acpi_processor_power { |
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 385d45b616db..6b72a4584086 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #define CPUIDLE_STATE_MAX 8 | 20 | #define CPUIDLE_STATE_MAX 8 |
21 | #define CPUIDLE_NAME_LEN 16 | 21 | #define CPUIDLE_NAME_LEN 16 |
22 | #define CPUIDLE_DESC_LEN 32 | ||
22 | 23 | ||
23 | struct cpuidle_device; | 24 | struct cpuidle_device; |
24 | 25 | ||
@@ -29,6 +30,7 @@ struct cpuidle_device; | |||
29 | 30 | ||
30 | struct cpuidle_state { | 31 | struct cpuidle_state { |
31 | char name[CPUIDLE_NAME_LEN]; | 32 | char name[CPUIDLE_NAME_LEN]; |
33 | char desc[CPUIDLE_DESC_LEN]; | ||
32 | void *driver_data; | 34 | void *driver_data; |
33 | 35 | ||
34 | unsigned int flags; | 36 | unsigned int flags; |