[COMMON] lib: dss: fix condition exiting hook hardlockup function
authorHosung Kim <hosung0.kim@samsung.com>
Tue, 19 Jun 2018 05:00:28 +0000 (14:00 +0900)
committerYoungmin Nam <youngmin.nam@samsung.com>
Fri, 29 Jun 2018 09:17:07 +0000 (18:17 +0900)
This commit fixes the condition when detecting hardlockup or
allcore hardlockup. If path is return, others should be waited
for 3 seconds. Checking dss_desc.allcorelockup_detected variable
is not valid in this function.

Change-Id: I4f65109368762cd1249a17af8d6d32f1cf873afa
Signed-off-by: Hosung Kim <hosung0.kim@samsung.com>
lib/debug-snapshot-utils.c

index c463dc3f9597bc208b04e67a44440ed87ad20258..ba6f8529366db97cdcb4b169750e2cc2343ab033 100644 (file)
@@ -71,7 +71,7 @@ void dbg_snapshot_hook_hardlockup_entry(void *v_regs)
                int ret;
                unsigned long last_pc;
                struct pt_regs *regs;
-               unsigned long timeout = USEC_PER_SEC * 3;
+               unsigned long timeout = USEC_PER_SEC * 2;
 
                do {
                        /*
@@ -93,8 +93,9 @@ void dbg_snapshot_hook_hardlockup_entry(void *v_regs)
 
                /* Then, we expect bug() function works well */
                pr_emerg("\n--------------------------------------------------------------------------\n"
-                       "      Debugging Information for Hardlockup core - CPU %d"
-                       "\n--------------------------------------------------------------------------\n\n", cpu);
+                       "      Debugging Information for Hardlockup core - CPU(%d), Mask:(0x%x)"
+                       "\n--------------------------------------------------------------------------\n\n",
+                       cpu, dss_desc.hardlockup_core_mask);
        }
 }
 
@@ -103,8 +104,7 @@ void dbg_snapshot_hook_hardlockup_exit(void)
        int cpu = raw_smp_processor_id();
 
        if (!dss_base.enabled ||
-               !dss_desc.hardlockup_core_mask ||
-               !dss_desc.allcorelockup_detected) {
+               !dss_desc.hardlockup_core_mask) {
                return;
        }