diff options
author | Jisheng Zhang <jszhang@marvell.com> | 2015-10-20 16:02:36 +0800 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2015-10-27 01:33:18 +0100 |
commit | f8af0e9c644caf64d0f42dce816c18346c744a9f (patch) | |
tree | acc265ff78963bf83a18e14782af352d613d893f /drivers/clocksource/time-pistachio.c | |
parent | d6df3576e6b4bcf765f5ace69915b4fa4a7ee1c3 (diff) | |
download | op-kernel-dev-f8af0e9c644caf64d0f42dce816c18346c744a9f.zip op-kernel-dev-f8af0e9c644caf64d0f42dce816c18346c744a9f.tar.gz |
clocksource/drivers/pistachio: Prevent ftrace recursion
Currently pistachio can be used as a scheduler clock. We properly marked
pistachio_read_sched_clock() as notrace but we then call another function
pistachio_clocksource_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 pistachio_clocksource_read_cycles()
function.
Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'drivers/clocksource/time-pistachio.c')
-rw-r--r-- | drivers/clocksource/time-pistachio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/clocksource/time-pistachio.c b/drivers/clocksource/time-pistachio.c index 18d4266..bba6799 100644 --- a/drivers/clocksource/time-pistachio.c +++ b/drivers/clocksource/time-pistachio.c @@ -67,7 +67,8 @@ static inline void gpt_writel(void __iomem *base, u32 value, u32 offset, writel(value, base + 0x20 * gpt_id + offset); } -static cycle_t pistachio_clocksource_read_cycles(struct clocksource *cs) +static cycle_t notrace +pistachio_clocksource_read_cycles(struct clocksource *cs) { struct pistachio_clocksource *pcs = to_pistachio_clocksource(cs); u32 counter, overflw; |