aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/compiler-gcc.h
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 /include/linux/compiler-gcc.h
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 'include/linux/compiler-gcc.h')
-rw-r--r--include/linux/compiler-gcc.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index 1514d534deeb..a3ed7cb8ca34 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -52,7 +52,15 @@
52#define __deprecated __attribute__((deprecated)) 52#define __deprecated __attribute__((deprecated))
53#define __packed __attribute__((packed)) 53#define __packed __attribute__((packed))
54#define __weak __attribute__((weak)) 54#define __weak __attribute__((weak))
55#define __naked __attribute__((naked)) 55
56/*
57 * it doesn't make sense on ARM (currently the only user of __naked) to trace
58 * naked functions because then mcount is called without stack and frame pointer
59 * being set up and there is no chance to restore the lr register to the value
60 * before mcount was called.
61 */
62#define __naked __attribute__((naked)) notrace
63
56#define __noreturn __attribute__((noreturn)) 64#define __noreturn __attribute__((noreturn))
57 65
58/* 66/*