aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Martin <dave.martin@linaro.org>2013-02-11 14:39:19 +0000
committerNicolas Pitre <nicolas.pitre@linaro.org>2013-06-20 00:45:29 -0400
commit21ba6d493d0aa19b1932880ebbab057a99a9a9a1 (patch)
tree09b67e6951ab47949c8645b36e0fecc7c895d776
parentb87db1b9e394f0d6c25bb9a4d2c85144fc571b5d (diff)
downloadvexpress-lsk-21ba6d493d0aa19b1932880ebbab057a99a9a9a1.tar.gz
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: Dave Martin <dave.martin@linaro.org>
-rw-r--r--arch/arm/common/bL_switcher.c3
-rw-r--r--arch/arm/include/asm/bL_switcher.h3
2 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm/common/bL_switcher.c b/arch/arm/common/bL_switcher.c
index adcd3fc8ccf..38c852627c3 100644
--- a/arch/arm/common/bL_switcher.c
+++ b/arch/arm/common/bL_switcher.c
@@ -576,7 +576,7 @@ static void bL_switcher_trace_trigger_cpu(void *__always_unused info)
trace_cpu_migrate_current(get_ns(), read_mpidr());
}
-static int bL_switcher_trace_trigger(void)
+int bL_switcher_trace_trigger(void)
{
int ret;
@@ -589,6 +589,7 @@ static int bL_switcher_trace_trigger(void)
return ret;
}
+EXPORT_SYMBOL_GPL(bL_switcher_trace_trigger);
static int bL_switcher_enable(void)
{
diff --git a/arch/arm/include/asm/bL_switcher.h b/arch/arm/include/asm/bL_switcher.h
index 71d1b6a986b..31df916c40a 100644
--- a/arch/arm/include/asm/bL_switcher.h
+++ b/arch/arm/include/asm/bL_switcher.h
@@ -57,6 +57,8 @@ int bL_switcher_unregister_notifier(struct notifier_block *nb);
bool bL_switcher_get_enabled(void);
void bL_switcher_put_enabled(void);
+int bL_switcher_trace_trigger(void);
+
#else
static void bL_switch_request_detach(unsigned int cpu,
bL_switch_completion_handler completer) { }
@@ -73,6 +75,7 @@ static inline int bL_switcher_unregister_notifier(struct notifier_block *nb)
static inline bool bL_switcher_get_enabled(void) { return false; }
static inline void bL_switcher_put_enabled(void) { }
+static inline int bL_switcher_trace_trigger(void) { return 0; }
#endif /* CONFIG_BL_SWITCHER */
#endif