From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: tglx@linutronix.de
Cc: Jisheng Zhang <jszhang@marvell.com>,
linux-kernel@vger.kernel.org (open list:CLOCKSOURCE, CLOC...)
Subject: [PATCH 2/8] clocksource/drivers/pistachio: Prevent ftrace recursion
Date: Wed, 28 Oct 2015 14:11:27 +0100 [thread overview]
Message-ID: <1446037894-22601-2-git-send-email-daniel.lezcano@linaro.org> (raw)
In-Reply-To: <1446037894-22601-1-git-send-email-daniel.lezcano@linaro.org>
From: Jisheng Zhang <jszhang@marvell.com>
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>
---
drivers/clocksource/time-pistachio.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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;
--
1.9.1
next prev parent reply other threads:[~2015-10-28 13:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-28 13:10 [PULL] clockevents: fixes for 4.3-rc7 Daniel Lezcano
2015-10-28 13:11 ` [PATCH 1/8] clocksource/drivers/arm_global_timer: Prevent ftrace recursion Daniel Lezcano
2015-10-28 13:11 ` Daniel Lezcano [this message]
2015-10-28 13:11 ` [PATCH 3/8] clocksource/drivers/samsung_pwm_timer: " Daniel Lezcano
2015-10-28 13:11 ` [PATCH 4/8] clocksource/drivers/prima2: " Daniel Lezcano
2015-10-28 13:11 ` [PATCH 5/8] clocksource/drivers/vf_pit_timer: " Daniel Lezcano
2015-10-28 13:11 ` [PATCH 6/8] clocksource/drivers/fsl_ftm_timer: " Daniel Lezcano
2015-10-28 13:11 ` [PATCH 7/8] clocksource/drivers/digicolor: " Daniel Lezcano
2015-10-28 13:11 ` [PATCH 8/8] clocksource/drivers/sh_mtu2: Fix multiple shutdown call issue Daniel Lezcano
2015-10-30 9:43 ` [PULL] clockevents: fixes for 4.3-rc7 Thomas Gleixner
2015-10-30 9:53 ` Daniel Lezcano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1446037894-22601-2-git-send-email-daniel.lezcano@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=jszhang@marvell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox