From: Jonghwan Choi <jhbird.choi@samsung.com>
To: "'Jonghwan Choi'" <jhbird.choi@samsung.com>,
linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org, "'Russell King'" <linux@arm.linux.org.uk>,
"'Stephen Boyd'" <sboyd@codeaurora.org>
Subject: [PATCH 3.8-stable] ARM: 7699/1: sched_clock: Add more notrace to prevent
Date: Thu, 25 Apr 2013 09:16:07 +0900 [thread overview]
Message-ID: <001501ce414a$14da9de0$3e8fd9a0$%choi@samsung.com> (raw)
In-Reply-To: <004801ce33e4$0a2ffc00$1e8ff400$%choi@samsung.com>
This patch looks like it should be in the 3.8-stable tree, should we apply
it?
------------------
From: "Stephen Boyd <sboyd@codeaurora.org>"
commit cea15092f098b7018e89f64a5a14bb71955965d5 upstream
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: Jonghwan Choi <jhbird.choi@samsung.com>
---
arch/arm/kernel/sched_clock.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/kernel/sched_clock.c b/arch/arm/kernel/sched_clock.c
index bd6f56b..59d2adb 100644
--- a/arch/arm/kernel/sched_clock.c
+++ b/arch/arm/kernel/sched_clock.c
@@ -45,12 +45,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;
--
1.7.9.5ml
next prev parent reply other threads:[~2013-04-25 0:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-07 23:02 [RESEND PATCH 3.8-stable] ARM: EXYNOS: Fix crash on soft reset on EXYNOS5440 Jonghwan Choi
2013-04-25 0:16 ` Jonghwan Choi [this message]
2013-04-25 0:26 ` [PATCH 3.8-stable] ARM: 7699/1: sched_clock: Add more notrace to prevent Stephen Boyd
2013-04-25 8:02 ` [PATCH 3.8-stable] ARM: 7690/1: mm: fix CONFIG_LPAE typos Jonghwan Choi
2013-04-25 8:20 ` Paul Bolle
2013-04-25 9:01 ` Will Deacon
2013-04-30 7:52 ` [PATCH 3.8-stable] lib/int_sqrt.c: optimize square root algorithm Jonghwan Choi
2013-04-30 17:32 ` Davidlohr Bueso
2013-05-08 2:04 ` [PATCH] net/core Fix wrong comments about memcpy_fromiovecend Jonghwan Choi
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='001501ce414a$14da9de0$3e8fd9a0$%choi@samsung.com' \
--to=jhbird.choi@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=sboyd@codeaurora.org \
--cc=stable@vger.kernel.org \
/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
all inboxes | Powered by JetHome®