diff options
author | Stephen Boyd <sboyd@codeaurora.org> | 2013-04-18 17:33:40 +0100 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2013-05-06 23:45:36 -0400 |
commit | fabd6736c1b69719d654027281d7e7ea16119f2f (patch) | |
tree | b4f072d7a6d00798e762388e2f9a26f7ac49d1c1 | |
parent | b196cda4767a3fcfd20a63b0c1004209f4359463 (diff) |
ARM: 7699/1: sched_clock: Add more notrace to prevent recursion
[ Upstream commit cea15092f098b7018e89f64a5a14bb71955965d5 ]
cyc_to_sched_clock() is called by sched_clock() and cyc_to_ns()
is called by cyc_to_sched_clock(). I suspect that some compilers
inline both of these functions into sched_clock() and so we've
been getting away without having a notrace marking. It seems that
my compiler isn't inlining cyc_to_sched_clock() though, so I'm
hitting a recursion bug when I enable the function graph tracer,
causing my system to crash. Marking these functions notrace fixes
it. Technically cyc_to_ns() doesn't need the notrace because it's
already marked inline, but let's just add it so that if we ever
remove inline from that function it doesn't blow up.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | arch/arm/kernel/sched_clock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/kernel/sched_clock.c b/arch/arm/kernel/sched_clock.c index f4515393248d..4975d1f89182 100644 --- a/arch/arm/kernel/sched_clock.c +++ b/arch/arm/kernel/sched_clock.c @@ -41,12 +41,12 @@ static u32 notrace jiffy_sched_clock_read(void) static u32 __read_mostly (*read_sched_clock)(void) = jiffy_sched_clock_read; -static inline u64 cyc_to_ns(u64 cyc, u32 mult, u32 shift) +static inline u64 notrace cyc_to_ns(u64 cyc, u32 mult, u32 shift) { return (cyc * mult) >> shift; } -static unsigned long long cyc_to_sched_clock(u32 cyc, u32 mask) +static unsigned long long notrace cyc_to_sched_clock(u32 cyc, u32 mask) { u64 epoch_ns; u32 epoch_cyc; |