summary refs log tree commit diff
path: root/drivers/clocksource/timer-ti-32k.c
diff options
context:
space:
mode:
authorJisheng Zhang <jszhang@marvell.com>2016-09-22 15:56:21 +0800
committerThomas Gleixner <tglx@linutronix.de>2016-09-22 16:49:19 +0200
commit3aa601492babdf3acdec89e5aa9c44e1a357a4d8 (patch)
treedfa01762981d88df47f2459fba13f5713e527f81 /drivers/clocksource/timer-ti-32k.c
parent6982530eab096939f9c5b607a5ce8078df19737e (diff)
downloadlinux-3aa601492babdf3acdec89e5aa9c44e1a357a4d8.tar.gz
clocksource/drivers/ti-32k: Prevent ftrace recursion
Currently ti-32k can be used as a scheduler clock. We properly marked
omap_32k_read_sched_clock() as notrace but we then call another
function ti_32k_read_cycles() that _wasn't_ notrace.

Having a traceable function in the sched_clock() path leads to a
recursion within ftrace and a kernel crash.

Fix this by adding notrace attribute to the ti_32k_read_cycles()
function.

Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
Cc: daniel.lezcano@linaro.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/20160922075621.3725-1-jszhang@marvell.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

Diffstat (limited to 'drivers/clocksource/timer-ti-32k.c')
-rw-r--r--drivers/clocksource/timer-ti-32k.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clocksource/timer-ti-32k.c b/drivers/clocksource/timer-ti-32k.c
index 92b7e390f6c8..cf5b14e442e4 100644
--- a/drivers/clocksource/timer-ti-32k.c
+++ b/drivers/clocksource/timer-ti-32k.c
@@ -65,7 +65,7 @@ static inline struct ti_32k *to_ti_32k(struct clocksource *cs)
 	return container_of(cs, struct ti_32k, cs);
 }
 
-static cycle_t ti_32k_read_cycles(struct clocksource *cs)
+static cycle_t notrace ti_32k_read_cycles(struct clocksource *cs)
 {
 	struct ti_32k *ti = to_ti_32k(cs);