linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: make cpu_init() notrace
@ 2013-04-18 16:20 Jon Medhurst (Tixy)
  2013-04-19 21:37 ` Nicolas Pitre
  2013-04-22 14:07 ` Russell King - ARM Linux
  0 siblings, 2 replies; 6+ messages in thread
From: Jon Medhurst (Tixy) @ 2013-04-18 16:20 UTC (permalink / raw)
  To: linux-arm-kernel

On resume from CPU power down any trace hooks enabled in cpu_init()
will get called before that function has done set_my_cpu_offset(),
so any use of per-cpu variables by trace hook code will cause bad
things to happen. Prevent this by marking the function notrace.

This fixes lockups/crashes seen when enabling function tracer on TC2
with the not yet mainlined cpuidle driver.

Signed-off-by: Jon Medhurst <tixy@linaro.org>
---
 arch/arm/kernel/setup.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index d343a6c..943cbf0 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -390,7 +390,7 @@ static void __init feat_v6_fixup(void)
  *
  * cpu_init sets up the per-CPU stacks.
  */
-void cpu_init(void)
+void notrace cpu_init(void)
 {
 	unsigned int cpu = smp_processor_id();
 	struct stack *stk = &stacks[cpu];
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-04-25 13:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-18 16:20 [PATCH] ARM: make cpu_init() notrace Jon Medhurst (Tixy)
2013-04-19 21:37 ` Nicolas Pitre
2013-04-22 14:07 ` Russell King - ARM Linux
2013-04-22 18:08   ` Jon Medhurst (Tixy)
2013-04-25 12:15     ` Russell King - ARM Linux
2013-04-25 13:50       ` Jon Medhurst (Tixy)

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).