aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChakravarty, Souvik K <souvik.k.chakravarty@intel.com>2017-11-24 08:34:43 -0500
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2017-11-27 06:39:11 -0500
commitffd623d4c5315a9767a5ee183159baf7295219a6 (patch)
tree742704e8574605155f79b3c185deeb2c9497dac9
parent0946a05fd220a24e7f3843011ef696578d02aa29 (diff)
platform/x86: intel_telemetry: Improve S0ix logs
Suspend with shallow wakes is not a useful parameter since the phenomena does not exist on deployed devices and is only a parameter of use during device power-on phase. The field always reads zero. Additionally there are other easier methods to detect it, e.g., if the S0ix counter increments by more than one during suspend. Hence the field is superfluous and can be removed. This patch also slightly renames the S0ix total field for better viewability. Signed-off-by: Souvik Kumar Chakravarty <souvik.k.chakravarty@intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
-rw-r--r--drivers/platform/x86/intel_telemetry_debugfs.c45
1 files changed, 7 insertions, 38 deletions
diff --git a/drivers/platform/x86/intel_telemetry_debugfs.c b/drivers/platform/x86/intel_telemetry_debugfs.c
index 5bc4f208cc8b..97aae982d2bd 100644
--- a/drivers/platform/x86/intel_telemetry_debugfs.c
+++ b/drivers/platform/x86/intel_telemetry_debugfs.c
@@ -98,10 +98,6 @@ static u32 suspend_shlw_ctr_temp, suspend_deep_ctr_temp;
98static u64 suspend_shlw_res_temp, suspend_deep_res_temp; 98static u64 suspend_shlw_res_temp, suspend_deep_res_temp;
99 99
100struct telemetry_susp_stats { 100struct telemetry_susp_stats {
101 u32 shlw_swake_ctr;
102 u32 deep_swake_ctr;
103 u64 shlw_swake_res;
104 u64 deep_swake_res;
105 u32 shlw_ctr; 101 u32 shlw_ctr;
106 u32 deep_ctr; 102 u32 deep_ctr;
107 u64 shlw_res; 103 u64 shlw_res;
@@ -598,19 +594,15 @@ static int telem_soc_states_show(struct seq_file *s, void *unused)
598 594
599 seq_printf(s, "S0IX Shallow\t\t\t %10u\t %10llu\n", 595 seq_printf(s, "S0IX Shallow\t\t\t %10u\t %10llu\n",
600 s0ix_shlw_ctr - 596 s0ix_shlw_ctr -
601 conf->suspend_stats.shlw_ctr - 597 conf->suspend_stats.shlw_ctr,
602 conf->suspend_stats.shlw_swake_ctr,
603 (u64)((s0ix_shlw_res - 598 (u64)((s0ix_shlw_res -
604 conf->suspend_stats.shlw_res - 599 conf->suspend_stats.shlw_res)*10/192));
605 conf->suspend_stats.shlw_swake_res)*10/192));
606 600
607 seq_printf(s, "S0IX Deep\t\t\t %10u\t %10llu\n", 601 seq_printf(s, "S0IX Deep\t\t\t %10u\t %10llu\n",
608 s0ix_deep_ctr - 602 s0ix_deep_ctr -
609 conf->suspend_stats.deep_ctr - 603 conf->suspend_stats.deep_ctr,
610 conf->suspend_stats.deep_swake_ctr,
611 (u64)((s0ix_deep_res - 604 (u64)((s0ix_deep_res -
612 conf->suspend_stats.deep_res - 605 conf->suspend_stats.deep_res)*10/192));
613 conf->suspend_stats.deep_swake_res)*10/192));
614 606
615 seq_printf(s, "Suspend(With S0ixShallow)\t %10u\t %10llu\n", 607 seq_printf(s, "Suspend(With S0ixShallow)\t %10u\t %10llu\n",
616 conf->suspend_stats.shlw_ctr, 608 conf->suspend_stats.shlw_ctr,
@@ -620,13 +612,7 @@ static int telem_soc_states_show(struct seq_file *s, void *unused)
620 conf->suspend_stats.deep_ctr, 612 conf->suspend_stats.deep_ctr,
621 (u64)(conf->suspend_stats.deep_res*10)/192); 613 (u64)(conf->suspend_stats.deep_res*10)/192);
622 614
623 seq_printf(s, "Suspend(With Shallow-Wakes)\t %10u\t %10llu\n", 615 seq_printf(s, "TOTAL S0IX\t\t\t %10u\t %10llu\n", s0ix_total_ctr,
624 conf->suspend_stats.shlw_swake_ctr +
625 conf->suspend_stats.deep_swake_ctr,
626 (u64)((conf->suspend_stats.shlw_swake_res +
627 conf->suspend_stats.deep_swake_res)*10/192));
628
629 seq_printf(s, "S0IX+Suspend Total\t\t %10u\t %10llu\n", s0ix_total_ctr,
630 (u64)(s0ix_total_res*10/192)); 616 (u64)(s0ix_total_res*10/192));
631 seq_puts(s, "\n-------------------------------------------------\n"); 617 seq_puts(s, "\n-------------------------------------------------\n");
632 seq_puts(s, "\t\tDEVICE STATES\n"); 618 seq_puts(s, "\t\tDEVICE STATES\n");
@@ -920,23 +906,15 @@ static int pm_suspend_exit_cb(void)
920 suspend_shlw_res_exit -= suspend_shlw_res_temp; 906 suspend_shlw_res_exit -= suspend_shlw_res_temp;
921 suspend_deep_res_exit -= suspend_deep_res_temp; 907 suspend_deep_res_exit -= suspend_deep_res_temp;
922 908
923 if (suspend_shlw_ctr_exit == 1) { 909 if (suspend_shlw_ctr_exit != 0) {
924 conf->suspend_stats.shlw_ctr += 910 conf->suspend_stats.shlw_ctr +=
925 suspend_shlw_ctr_exit; 911 suspend_shlw_ctr_exit;
926 912
927 conf->suspend_stats.shlw_res += 913 conf->suspend_stats.shlw_res +=
928 suspend_shlw_res_exit; 914 suspend_shlw_res_exit;
929 } 915 }
930 /* Shallow Wakes Case */
931 else if (suspend_shlw_ctr_exit > 1) {
932 conf->suspend_stats.shlw_swake_ctr +=
933 suspend_shlw_ctr_exit;
934
935 conf->suspend_stats.shlw_swake_res +=
936 suspend_shlw_res_exit;
937 }
938 916
939 if (suspend_deep_ctr_exit == 1) { 917 if (suspend_deep_ctr_exit != 0) {
940 conf->suspend_stats.deep_ctr += 918 conf->suspend_stats.deep_ctr +=
941 suspend_deep_ctr_exit; 919 suspend_deep_ctr_exit;
942 920
@@ -944,15 +922,6 @@ static int pm_suspend_exit_cb(void)
944 suspend_deep_res_exit; 922 suspend_deep_res_exit;
945 } 923 }
946 924
947 /* Shallow Wakes Case */
948 else if (suspend_deep_ctr_exit > 1) {
949 conf->suspend_stats.deep_swake_ctr +=
950 suspend_deep_ctr_exit;
951
952 conf->suspend_stats.deep_swake_res +=
953 suspend_deep_res_exit;
954 }
955
956out: 925out:
957 suspend_prep_ok = 0; 926 suspend_prep_ok = 0;
958 return NOTIFY_OK; 927 return NOTIFY_OK;