Loading drivers/clk/clk.c +15 −9 Original line number Diff line number Diff line Loading @@ -3268,10 +3268,12 @@ static void clk_debug_unregister(struct clk_core *core) } #ifdef CONFIG_COMMON_CLK_QCOM_DEBUG #define clock_debug_output(m, fmt, ...) \ #define clock_debug_output(m, c, fmt, ...) \ do { \ if (m) \ seq_printf(m, fmt, ##__VA_ARGS__); \ else if (c) \ pr_cont(fmt, ##__VA_ARGS__); \ else \ pr_info(fmt, ##__VA_ARGS__); \ } while (0) Loading @@ -3284,28 +3286,29 @@ static int clock_debug_print_clock(struct clk_core *c, struct seq_file *s) if (!c || !c->prepare_count) return 0; clock_debug_output(s, 0, " "); clk = c->hw->clk; do { c = clk->core; if (c->ops->list_rate_vdd_level) clock_debug_output(s, "%s%s:%u:%u [%ld, %d]", start, clock_debug_output(s, 1, "%s%s:%u:%u [%ld, %d]", start, c->name, c->prepare_count, c->enable_count, c->rate, c->ops->list_rate_vdd_level(c->hw, c->rate)); else clock_debug_output(s, "%s%s:%u:%u [%ld]", start, clock_debug_output(s, 1, "%s%s:%u:%u [%ld]", start, c->name, c->prepare_count, c->enable_count, c->rate); start = " -> "; } while (s && (clk = clk_get_parent(clk))); } while ((clk = clk_get_parent(clk))); if (s) clock_debug_output(s, "\n"); clock_debug_output(s, 1, "\n"); return 1; } Loading @@ -3318,21 +3321,23 @@ static void clock_debug_print_enabled_clocks(struct seq_file *s) struct clk_core *core; int cnt = 0; clock_debug_output(s, "Enabled clocks:\n"); clock_debug_output(s, 0, "Enabled clocks:\n"); hlist_for_each_entry(core, &clk_debug_list, debug_node) cnt += clock_debug_print_clock(core, s); if (cnt) clock_debug_output(s, "Enabled clock count: %d\n", cnt); clock_debug_output(s, 0, "Enabled clock count: %d\n", cnt); else clock_debug_output(s, "No clocks enabled.\n"); clock_debug_output(s, 0, "No clocks enabled.\n"); } static int enabled_clocks_show(struct seq_file *s, void *unused) { mutex_lock(&clk_debug_lock); clock_debug_print_enabled_clocks(s); mutex_unlock(&clk_debug_lock); return 0; Loading Loading @@ -3365,6 +3370,7 @@ void clock_debug_print_enabled(void) return; clock_debug_print_enabled_clocks(NULL); mutex_unlock(&clk_debug_lock); } EXPORT_SYMBOL(clock_debug_print_enabled); Loading drivers/clk/clk.h +0 −3 Original line number Diff line number Diff line Loading @@ -26,9 +26,6 @@ struct clk *clk_hw_create_clk(struct device *dev, struct clk_hw *hw, const char *dev_id, const char *con_id); void __clk_put(struct clk *clk); /* Debugfs API to print the enabled clocks */ void clock_debug_print_enabled(void); #else /* All these casts to avoid ifdefs in clkdev... */ static inline struct clk * Loading drivers/cpuidle/lpm-levels.c +12 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ #include <asm/cpuidle.h> #include "lpm-levels.h" #include <trace/events/power.h> #include "../clk/clk.h" #include <linux/clk.h> #define CREATE_TRACE_POINTS #include <trace/events/trace_msm_low_power.h> Loading Loading @@ -870,6 +870,17 @@ static int cluster_configure(struct lpm_cluster *cluster, int idx, } if (level->notify_rpm) { /* * Print enabled clocks and regulators which are on during * system suspend. This debug information is useful to know * which resources are enabled and preventing system level * LPMs (XO and Vmin). */ if (!from_idle) { clock_debug_print_enabled(); regulator_debug_print_enabled(); } cpu = get_next_online_cpu(from_idle); cpumask_copy(&cpumask, cpumask_of(cpu)); clear_predict_history(); Loading include/linux/clk.h +7 −0 Original line number Diff line number Diff line Loading @@ -982,4 +982,11 @@ static inline struct clk *of_clk_get_from_provider(struct of_phandle_args *clksp } #endif #ifdef CONFIG_COMMON_CLK_QCOM_DEBUG /* Debugfs API to print the enabled clocks */ void clock_debug_print_enabled(void); #else static inline void clock_debug_print_enabled(void){} #endif #endif Loading
drivers/clk/clk.c +15 −9 Original line number Diff line number Diff line Loading @@ -3268,10 +3268,12 @@ static void clk_debug_unregister(struct clk_core *core) } #ifdef CONFIG_COMMON_CLK_QCOM_DEBUG #define clock_debug_output(m, fmt, ...) \ #define clock_debug_output(m, c, fmt, ...) \ do { \ if (m) \ seq_printf(m, fmt, ##__VA_ARGS__); \ else if (c) \ pr_cont(fmt, ##__VA_ARGS__); \ else \ pr_info(fmt, ##__VA_ARGS__); \ } while (0) Loading @@ -3284,28 +3286,29 @@ static int clock_debug_print_clock(struct clk_core *c, struct seq_file *s) if (!c || !c->prepare_count) return 0; clock_debug_output(s, 0, " "); clk = c->hw->clk; do { c = clk->core; if (c->ops->list_rate_vdd_level) clock_debug_output(s, "%s%s:%u:%u [%ld, %d]", start, clock_debug_output(s, 1, "%s%s:%u:%u [%ld, %d]", start, c->name, c->prepare_count, c->enable_count, c->rate, c->ops->list_rate_vdd_level(c->hw, c->rate)); else clock_debug_output(s, "%s%s:%u:%u [%ld]", start, clock_debug_output(s, 1, "%s%s:%u:%u [%ld]", start, c->name, c->prepare_count, c->enable_count, c->rate); start = " -> "; } while (s && (clk = clk_get_parent(clk))); } while ((clk = clk_get_parent(clk))); if (s) clock_debug_output(s, "\n"); clock_debug_output(s, 1, "\n"); return 1; } Loading @@ -3318,21 +3321,23 @@ static void clock_debug_print_enabled_clocks(struct seq_file *s) struct clk_core *core; int cnt = 0; clock_debug_output(s, "Enabled clocks:\n"); clock_debug_output(s, 0, "Enabled clocks:\n"); hlist_for_each_entry(core, &clk_debug_list, debug_node) cnt += clock_debug_print_clock(core, s); if (cnt) clock_debug_output(s, "Enabled clock count: %d\n", cnt); clock_debug_output(s, 0, "Enabled clock count: %d\n", cnt); else clock_debug_output(s, "No clocks enabled.\n"); clock_debug_output(s, 0, "No clocks enabled.\n"); } static int enabled_clocks_show(struct seq_file *s, void *unused) { mutex_lock(&clk_debug_lock); clock_debug_print_enabled_clocks(s); mutex_unlock(&clk_debug_lock); return 0; Loading Loading @@ -3365,6 +3370,7 @@ void clock_debug_print_enabled(void) return; clock_debug_print_enabled_clocks(NULL); mutex_unlock(&clk_debug_lock); } EXPORT_SYMBOL(clock_debug_print_enabled); Loading
drivers/clk/clk.h +0 −3 Original line number Diff line number Diff line Loading @@ -26,9 +26,6 @@ struct clk *clk_hw_create_clk(struct device *dev, struct clk_hw *hw, const char *dev_id, const char *con_id); void __clk_put(struct clk *clk); /* Debugfs API to print the enabled clocks */ void clock_debug_print_enabled(void); #else /* All these casts to avoid ifdefs in clkdev... */ static inline struct clk * Loading
drivers/cpuidle/lpm-levels.c +12 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ #include <asm/cpuidle.h> #include "lpm-levels.h" #include <trace/events/power.h> #include "../clk/clk.h" #include <linux/clk.h> #define CREATE_TRACE_POINTS #include <trace/events/trace_msm_low_power.h> Loading Loading @@ -870,6 +870,17 @@ static int cluster_configure(struct lpm_cluster *cluster, int idx, } if (level->notify_rpm) { /* * Print enabled clocks and regulators which are on during * system suspend. This debug information is useful to know * which resources are enabled and preventing system level * LPMs (XO and Vmin). */ if (!from_idle) { clock_debug_print_enabled(); regulator_debug_print_enabled(); } cpu = get_next_online_cpu(from_idle); cpumask_copy(&cpumask, cpumask_of(cpu)); clear_predict_history(); Loading
include/linux/clk.h +7 −0 Original line number Diff line number Diff line Loading @@ -982,4 +982,11 @@ static inline struct clk *of_clk_get_from_provider(struct of_phandle_args *clksp } #endif #ifdef CONFIG_COMMON_CLK_QCOM_DEBUG /* Debugfs API to print the enabled clocks */ void clock_debug_print_enabled(void); #else static inline void clock_debug_print_enabled(void){} #endif #endif