diff -purN -X dontdiff-powertop powertop-intel/config.h powertop/config.h diff -purN -X dontdiff-powertop powertop-intel/src/cpu/cpu.cpp powertop/src/cpu/cpu.cpp --- powertop-intel/src/cpu/cpu.cpp 2012-07-05 13:06:16.000000000 +0400 +++ powertop/src/cpu/cpu.cpp 2012-07-05 18:43:19.704809327 +0400 @@ -618,6 +618,11 @@ void report_display_cpu_pstates(void) unsigned int package, core, cpu; int line; class abstract_cpu *_package, * _core, * _cpu; + unsigned int i, pstates_num; + + for (i = 0, pstates_num = 0; i < all_cpus.size(); i++) + if (all_cpus[i] && all_cpus[i]->pstates.size() > pstates_num) + pstates_num = all_cpus[i]->pstates.size(); if ((!reportout.csv_report)&&(!reportout.http_report)) return; @@ -644,7 +649,7 @@ void report_display_cpu_pstates(void) if (!_core) continue; - for (line = LEVEL_HEADER; line < 10; line++) { + for (line = LEVEL_HEADER; line < (int)pstates_num; line++) { int first = 1; if (!_package->has_pstate_level(line))