From: fweisbec@gmail.com (Frederic Weisbecker)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm: Fix build error with context tracking calls
Date: Fri, 13 Sep 2013 19:03:34 +0200 [thread overview]
Message-ID: <20130913170331.GA8453@somewhere> (raw)
In-Reply-To: <87y574g1fi.fsf@linaro.org>
On Tue, Sep 10, 2013 at 08:07:45AM -0700, Kevin Hilman wrote:
> Nicolas Pitre <nicolas.pitre@linaro.org> writes:
>
> > Adding Kevin Hilman to the CC as he might be interested as well.
>
> Thanks, I'd already noticed this but was distracted getting arm-soc
> changes ready for the merge window. Looking into it now.
Kevin, can you please try this patch? It built tested fine on ARM
and live tested correctly on x86. There should be no problem but
just in case.
Thanks!
---
>From 9bb601401baea0a2b2eead3909a9f186d894d617 Mon Sep 17 00:00:00 2001
From: Frederic Weisbecker <fweisbec@gmail.com>
Date: Tue, 10 Sep 2013 00:54:17 +0200
Subject: [PATCH] arm: Fix build error with context tracking calls
ad65782fba50 (context_tracking: Optimize main APIs off case
with static key) converted context tracking main APIs to inline
functions and left ARM asm callers behind.
This can be easily fixed by making ARM calling the post static
keys context tracking functions. We just need to replicate the
static key checks there. We'll remove these later when ARM will
support the context tracking static keys.
Reported-by: Guenter Roeck <linux@roeck-us.net>
Reported-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Kevin Hilman <khilman@linaro.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: Anil Kumar <anilk4.v@gmail.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Benoit Cousson <b-cousson@ti.com>
---
| 8 ++++----
kernel/context_tracking.c | 12 ++++++++++++
2 files changed, 16 insertions(+), 4 deletions(-)
--git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S
index de23a9b..39f89fb 100644
--- a/arch/arm/kernel/entry-header.S
+++ b/arch/arm/kernel/entry-header.S
@@ -329,10 +329,10 @@
#ifdef CONFIG_CONTEXT_TRACKING
.if \save
stmdb sp!, {r0-r3, ip, lr}
- bl user_exit
+ bl context_tracking_user_exit
ldmia sp!, {r0-r3, ip, lr}
.else
- bl user_exit
+ bl context_tracking_user_exit
.endif
#endif
.endm
@@ -341,10 +341,10 @@
#ifdef CONFIG_CONTEXT_TRACKING
.if \save
stmdb sp!, {r0-r3, ip, lr}
- bl user_enter
+ bl context_tracking_user_enter
ldmia sp!, {r0-r3, ip, lr}
.else
- bl user_enter
+ bl context_tracking_user_enter
.endif
#endif
.endm
diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c
index 247091b..859c8df 100644
--- a/kernel/context_tracking.c
+++ b/kernel/context_tracking.c
@@ -51,6 +51,15 @@ void context_tracking_user_enter(void)
unsigned long flags;
/*
+ * Repeat the user_enter() check here because some archs may be calling
+ * this from asm and if no CPU needs context tracking, they shouldn't
+ * go further. We can remove that check here once these archs support the static key
+ * check.
+ */
+ if (!static_key_false(&context_tracking_enabled))
+ return;
+
+ /*
* Some contexts may involve an exception occuring in an irq,
* leading to that nesting:
* rcu_irq_enter() rcu_user_exit() rcu_user_exit() rcu_irq_exit()
@@ -151,6 +160,9 @@ void context_tracking_user_exit(void)
{
unsigned long flags;
+ if (!static_key_false(&context_tracking_enabled))
+ return;
+
if (in_interrupt())
return;
--
1.7.5.4
next prev parent reply other threads:[~2013-09-13 17:03 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-08 6:04 Build error in torvalds kernel 3.11 for omap2plus Anil Kumar
2013-09-08 9:02 ` Russell King - ARM Linux
2013-09-08 17:16 ` Guenter Roeck
2013-09-09 10:51 ` Russell King - ARM Linux
2013-09-09 12:00 ` Guenter Roeck
2013-09-09 14:24 ` Nicolas Pitre
2013-09-09 16:03 ` Guenter Roeck
2013-09-09 20:31 ` Russell King - ARM Linux
2013-09-09 21:02 ` Guenter Roeck
2013-09-09 21:16 ` Nicolas Pitre
2013-09-10 15:07 ` Kevin Hilman
2013-09-10 15:09 ` Frederic Weisbecker
2013-09-13 17:03 ` Frederic Weisbecker [this message]
2013-09-13 22:50 ` [PATCH] arm: Fix build error with context tracking calls Kevin Hilman
2013-09-14 14:19 ` Frederic Weisbecker
2013-09-16 17:11 ` Kevin Hilman
2013-09-14 14:32 ` Russell King - ARM Linux
2013-09-22 16:59 ` Frederic Weisbecker
2013-09-25 17:38 ` Kevin Hilman
2013-09-27 13:30 ` Frederic Weisbecker
2013-09-09 10:55 ` Build error in torvalds kernel 3.11 for omap2plus Anil Kumar
2013-09-09 11:30 ` Guenter Roeck
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=20130913170331.GA8453@somewhere \
--to=fweisbec@gmail.com \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).