};
/* declare notifier_list */
-static ATOMIC_NOTIFIER_HEAD(itmon_notifier_list);
+ATOMIC_NOTIFIER_HEAD(itmon_notifier_list);
static const struct of_device_id itmon_dt_match[] = {
{.compatible = "samsung,exynos-itmon",
extern void dbg_snapshot_cpuidle(char *modes, unsigned state, int diff, int en);
extern void dbg_snapshot_suspend(void *fn, void *dev, int en);
extern void dbg_snapshot_irq(int irq, void *fn, void *val, int en);
+extern void dbg_snapshot_print_notifier_call(void **nl, unsigned long func, int en);
extern int dbg_snapshot_try_enable(const char *name, unsigned long long duration);
extern int dbg_snapshot_set_enable(const char *name, int en);
extern int dbg_snapshot_get_enable(const char *name);
static inline void dbg_snapshot_bug_func(void) {BUG();}
static inline void dbg_snapshot_spin_func(void) {do {wfi();} while(1);}
+extern struct atomic_notifier_head restart_handler_list;
+extern struct blocking_notifier_head reboot_notifier_list;
+
+#ifdef CONFIG_EXYNOS_ITMON
+extern struct atomic_notifier_head itmon_notifier_list;
+#endif
+
/**
* dsslog_flag - added log information supported.
* @DSS_FLAG_REQ: Generally, marking starting request something
continue;
}
#endif
+ dbg_snapshot_print_notifier_call((void **)nl,
+ (unsigned long)nb->notifier_call, DSS_FLAG_IN);
ret = nb->notifier_call(nb, val, v);
+ dbg_snapshot_print_notifier_call((void **)nl,
+ (unsigned long)nb->notifier_call, DSS_FLAG_OUT);
if (nr_calls)
(*nr_calls)++;
* Notifier list for kernel code which wants to be called
* to restart the system.
*/
-static ATOMIC_NOTIFIER_HEAD(restart_handler_list);
+ATOMIC_NOTIFIER_HEAD(restart_handler_list);
/**
* register_restart_handler - Register function to be called to reset
}
#endif
+static struct notifier_block **dss_should_check_nl[] = {
+ (struct notifier_block **)(&panic_notifier_list.head),
+ (struct notifier_block **)(&reboot_notifier_list.head),
+ (struct notifier_block **)(&restart_handler_list.head),
+#ifdef CONFIG_EXYNOS_ITMON
+ (struct notifier_block **)(&itmon_notifier_list.head),
+#endif
+};
+
+void dbg_snapshot_print_notifier_call(void **nl, unsigned long func, int en)
+{
+ struct notifier_block **nl_org = (struct notifier_block **)nl;
+ char notifier_name[KSYM_NAME_LEN];
+ char notifier_func_name[KSYM_NAME_LEN];
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(dss_should_check_nl); i++) {
+ if (nl_org == dss_should_check_nl[i]) {
+ lookup_symbol_name((unsigned long)nl_org, notifier_name);
+ lookup_symbol_name((unsigned long)func, notifier_func_name);
+
+ pr_info("debug-snapshot: %s -> %s call %s\n",
+ notifier_name,
+ notifier_func_name,
+ en == DSS_FLAG_IN ? "+" : "-");
+ break;
+ }
+ }
+}
+
#ifdef CONFIG_DEBUG_SNAPSHOT_FREQ
static void dbg_snapshot_print_freqinfo(void)
{