Commit 29064b88 authored by Dave Martin's avatar Dave Martin Committed by Nicolas Pitre

ARM: bL_switcher/trace: Add kernel trace trigger interface

This patch exports a bL_switcher_trace_trigger() function to
provide a means for drivers using the trace events to get the
current status when starting a trace session.

Calling this function is equivalent to pinging the trace_trigger
file in sysfs.
Signed-off-by: default avatarDave Martin <dave.martin@linaro.org>
parent b09bbe5b
...@@ -537,7 +537,7 @@ static void bL_switcher_trace_trigger_cpu(void *__always_unused info) ...@@ -537,7 +537,7 @@ static void bL_switcher_trace_trigger_cpu(void *__always_unused info)
trace_cpu_migrate_current(get_ns(), read_mpidr()); trace_cpu_migrate_current(get_ns(), read_mpidr());
} }
static int bL_switcher_trace_trigger(void) int bL_switcher_trace_trigger(void)
{ {
int ret; int ret;
...@@ -550,6 +550,7 @@ static int bL_switcher_trace_trigger(void) ...@@ -550,6 +550,7 @@ static int bL_switcher_trace_trigger(void)
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(bL_switcher_trace_trigger);
static int bL_switcher_enable(void) static int bL_switcher_enable(void)
{ {
......
...@@ -54,6 +54,8 @@ int bL_switcher_unregister_notifier(struct notifier_block *nb); ...@@ -54,6 +54,8 @@ int bL_switcher_unregister_notifier(struct notifier_block *nb);
bool bL_switcher_get_enabled(void); bool bL_switcher_get_enabled(void);
void bL_switcher_put_enabled(void); void bL_switcher_put_enabled(void);
int bL_switcher_trace_trigger(void);
#else #else
static inline int bL_switcher_register_notifier(struct notifier_block *nb) static inline int bL_switcher_register_notifier(struct notifier_block *nb)
{ {
...@@ -67,6 +69,7 @@ static inline int bL_switcher_unregister_notifier(struct notifier_block *nb) ...@@ -67,6 +69,7 @@ static inline int bL_switcher_unregister_notifier(struct notifier_block *nb)
static inline bool bL_switcher_get_enabled(void) { return false; } static inline bool bL_switcher_get_enabled(void) { return false; }
static inline void bL_switcher_put_enabled(void) { } static inline void bL_switcher_put_enabled(void) { }
static inline int bL_switcher_trace_trigger(void) { return 0; }
#endif /* CONFIG_BL_SWITCHER */ #endif /* CONFIG_BL_SWITCHER */
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment