diff options
author | Thomas Renninger <trenn@suse.de> | 2011-08-11 19:11:37 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2011-08-15 14:03:10 -0400 |
commit | 7c74d2bc5a9d43d33d6f16c1e706147162e2bc52 (patch) | |
tree | f9a3578dca29ca782df483d9cdc8f5bc376d5ef2 /tools/power/cpupower/utils/helpers/helpers.h | |
parent | 88f984e0e235f82a5d34f4a99244eeb14e1413e0 (diff) |
cpupower: Better detect offlined CPUs
Before, checking for offlined CPUs was done dirty and
it was checked whether topology parsing returned -1 values.
But this is a valid case on a Xen (and possibly other) kernels.
Do proper online/offline checking, also take CONFIG_HOTPLUG_CPU
option into account (no /sys/devices/../cpuX/online file).
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'tools/power/cpupower/utils/helpers/helpers.h')
-rw-r--r-- | tools/power/cpupower/utils/helpers/helpers.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/power/cpupower/utils/helpers/helpers.h b/tools/power/cpupower/utils/helpers/helpers.h index 592ee362b877..7a83022733b2 100644 --- a/tools/power/cpupower/utils/helpers/helpers.h +++ b/tools/power/cpupower/utils/helpers/helpers.h | |||
@@ -96,6 +96,9 @@ struct cpupower_topology { | |||
96 | int pkg; | 96 | int pkg; |
97 | int core; | 97 | int core; |
98 | int cpu; | 98 | int cpu; |
99 | |||
100 | /* flags */ | ||
101 | unsigned int is_online:1; | ||
99 | } *core_info; | 102 | } *core_info; |
100 | }; | 103 | }; |
101 | 104 | ||