samsung: Change print level for emc and cpuhp
authorYoungtae Lee <yt0729.lee@samsung.com>
Mon, 18 Jun 2018 07:49:28 +0000 (16:49 +0900)
committerlakkyung.jung <lakkyung.jung@samsung.com>
Mon, 23 Jul 2018 05:59:42 +0000 (14:59 +0900)
Change-Id: Ifd39e1c4d7aaabd0f83cdba83fd3b0c851b7df7e
Signed-off-by: Youngtae Lee <yt0729.lee@samsung.com>
drivers/soc/samsung/exynos-cpuhp.c
drivers/soc/samsung/exynos-emc.c

index 3233f623b94a189f22ab5fa23b1003ec520872c6..8b9b75f3d54f7f6dc482f4ada1597c5665b3778c 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/kthread.h>
 #include <linux/pm_qos.h>
 #include <linux/suspend.h>
+#include <linux/debug-snapshot.h>
 
 #include <soc/samsung/exynos-cpuhp.h>
 
@@ -316,7 +317,11 @@ static void cpuhp_print_debug_info(struct cpumask online_cpus, int fast_hp)
 
        scnprintf(pre_buf, sizeof(pre_buf), "%*pbl", cpumask_pr_args(&cpuhp.online_cpus));
        scnprintf(new_buf, sizeof(new_buf), "%*pbl", cpumask_pr_args(&online_cpus));
-       pr_info("%s: %s -> %s fast_hp=%d\n", __func__, pre_buf, new_buf, fast_hp);
+       dbg_snapshot_printk("%s: %s -> %s fast_hp=%d\n", __func__, pre_buf, new_buf, fast_hp);
+
+       /* print cpu control information */
+       if (cpuhp.debug)
+               pr_info("%s: %s -> %s fast_hp=%d\n", __func__, pre_buf, new_buf, fast_hp);
 }
 
 /*
@@ -340,10 +345,7 @@ static int cpuhp_do(int fast_hp)
        }
 
        online_cpus = cpuhp_get_online_cpus();
-
-       /* print cpu control information */
-//     if (cpuhp.debug)
-               cpuhp_print_debug_info(online_cpus, fast_hp);
+       cpuhp_print_debug_info(online_cpus, fast_hp);
 
        /* if there is no mask change, skip */
        if (cpumask_equal(&cpuhp.online_cpus, &online_cpus))
index 0f305f5834bee3caefef3056e8f2643a56122e40..824a6a04f8b1bd4daf0bf94fbfa58f2bd34cabda 100644 (file)
@@ -87,6 +87,7 @@ struct emc {
        struct emc_mode         *cur_mode;      /* current mode */
        struct emc_mode         *req_mode;      /* requested mode */
        struct emc_mode         *user_mode;     /* user requesting mode */
+       unsigned int            in_progress;
        struct cpumask          heavy_cpus;     /* cpus need to boost */
        struct cpumask          busy_cpus;      /* cpus need to online */
        /* loadsum of boostable and trigger domain */
@@ -566,6 +567,7 @@ static int emc_do_mode_change(void *data)
                        break;
 
                spin_lock_irqsave(&emc_lock, flags);
+               emc.in_progress = 1;
                event = emc_clear_event();
 
                trace_emc_do_mode_change(emc.cur_mode->name,
@@ -577,8 +579,9 @@ static int emc_do_mode_change(void *data)
                /* request mode change */
                exynos_cpuhp_request("EMC", emc.cur_mode->cpus, emc.ctrl_type);
 
-               pr_info("EMC_MODE: %s (cpus%d)\n", emc.cur_mode->name,
-                                       cpumask_weight(&emc.cur_mode->cpus));
+               dbg_snapshot_printk("EMC: mode change finished %s (cpus%d)\n",
+                       emc.cur_mode->name, cpumask_weight(&emc.cur_mode->cpus));
+               emc.in_progress = 0;
        }
 
        return 0;