aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/fiq.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2009-03-12 13:03:16 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-03-12 17:33:03 -0400
commit446c92b2901bedb3725d29b4e73def8aba623ffc (patch)
tree5669761e042f8321214ca5a975fec536fa5f0efd /arch/arm/kernel/fiq.c
parent9311c593f24f28de2a339da602644f0f7ae0fc60 (diff)
[ARM] 5421/1: ftrace: fix crash due to tracing of __naked functions
This is a fix for the following crash observed in 2.6.29-rc3: http://lkml.org/lkml/2009/1/29/150 On ARM it doesn't make sense to trace a naked function because then mcount is called without stack and frame pointer being set up and there is no chance to restore the lr register to the value before mcount was called. Reported-by: Matthias Kaehlcke <matthias@kaehlcke.net> Tested-by: Matthias Kaehlcke <matthias@kaehlcke.net> Cc: Abhishek Sagar <sagar.abhishek@gmail.com> Cc: Steven Rostedt <rostedt@home.goodmis.org> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/fiq.c')
-rw-r--r--arch/arm/kernel/fiq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/kernel/fiq.c b/arch/arm/kernel/fiq.c
index 36f81d967979..6ff7919613d7 100644
--- a/arch/arm/kernel/fiq.c
+++ b/arch/arm/kernel/fiq.c
@@ -88,7 +88,7 @@ void set_fiq_handler(void *start, unsigned int length)
88 * disable irqs for the duration. Note - these functions are almost 88 * disable irqs for the duration. Note - these functions are almost
89 * entirely coded in assembly. 89 * entirely coded in assembly.
90 */ 90 */
91void __attribute__((naked)) set_fiq_regs(struct pt_regs *regs) 91void __naked set_fiq_regs(struct pt_regs *regs)
92{ 92{
93 register unsigned long tmp; 93 register unsigned long tmp;
94 asm volatile ( 94 asm volatile (
@@ -106,7 +106,7 @@ void __attribute__((naked)) set_fiq_regs(struct pt_regs *regs)
106 : "r" (&regs->ARM_r8), "I" (PSR_I_BIT | PSR_F_BIT | FIQ_MODE)); 106 : "r" (&regs->ARM_r8), "I" (PSR_I_BIT | PSR_F_BIT | FIQ_MODE));
107} 107}
108 108
109void __attribute__((naked)) get_fiq_regs(struct pt_regs *regs) 109void __naked get_fiq_regs(struct pt_regs *regs)
110{ 110{
111 register unsigned long tmp; 111 register unsigned long tmp;
112 asm volatile ( 112 asm volatile (