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-05-13 19:03:41 -0400
commitde2773b359751f6abf40b1112b07c1d1da26e786 (patch)
treed08068bfcd626e323f80b5eb5e5b96ce51ed5f27
parent56e453ef248c69627f35c7c901838398a4f8bdd4 (diff)
downloadvexpress-lsk-de2773b359751f6abf40b1112b07c1d1da26e786.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 b878e6f6dd5..1506bf536d1 100644
--- a/arch/arm/common/bL_switcher.c
+++ b/arch/arm/common/bL_switcher.c
@@ -464,7 +464,7 @@ static void bL_switcher_trace_trigger_cpu(void *__always_unused info)
trace_cpu_migrate_current(get_ns(), read_mpidr() & MPIDR_HWID_BITMASK);
}
-static int bL_switcher_trace_trigger(void)
+int bL_switcher_trace_trigger(void)
{
int ret;
@@ -477,6 +477,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 914739d17e3..d60e77d179a 100644
--- a/arch/arm/include/asm/bL_switcher.h
+++ b/arch/arm/include/asm/bL_switcher.h
@@ -46,6 +46,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 inline int bL_switcher_register_notifier(struct notifier_block *nb)
{
@@ -59,6 +61,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