aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt <rostedt@goodmis.org>2008-10-31 09:36:38 -0400
committerIngo Molnar <mingo@elte.hu>2008-11-03 05:03:43 -0500
commit7e5e26a3d8ac4bcadb380073dc9604c07a9a6198 (patch)
tree68f6e0ab79358b198ba9cf404d647d2188146292
parent7a895f53cda9d9362c30144e42c124a1ae996b9e (diff)
ftrace: fix hardirq header for non ftrace archs
Impact: build fix for non-ftrace architectures Not all archs implement ftrace, and therefore do not have an asm/ftrace.h. This patch corrects the problem. The ftrace_nmi_enter/exit now must be defined for all archs that implement dynamic ftrace. Currently, only x86 does. Signed-off-by: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--arch/arm/include/asm/ftrace.h5
-rw-r--r--arch/powerpc/include/asm/ftrace.h5
-rw-r--r--arch/sh/include/asm/ftrace.h5
-rw-r--r--arch/sparc/include/asm/ftrace.h5
-rw-r--r--arch/x86/include/asm/ftrace.h16
-rw-r--r--include/linux/ftrace.h5
-rw-r--r--include/linux/hardirq.h2
7 files changed, 5 insertions, 38 deletions
diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
index 3f3a1d1508ea..39c8bc1a006a 100644
--- a/arch/arm/include/asm/ftrace.h
+++ b/arch/arm/include/asm/ftrace.h
@@ -1,11 +1,6 @@
1#ifndef _ASM_ARM_FTRACE 1#ifndef _ASM_ARM_FTRACE
2#define _ASM_ARM_FTRACE 2#define _ASM_ARM_FTRACE
3 3
4#ifndef __ASSEMBLY__
5static inline void ftrace_nmi_enter(void) { }
6static inline void ftrace_nmi_exit(void) { }
7#endif
8
9#ifdef CONFIG_FUNCTION_TRACER 4#ifdef CONFIG_FUNCTION_TRACER
10#define MCOUNT_ADDR ((long)(mcount)) 5#define MCOUNT_ADDR ((long)(mcount))
11#define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */ 6#define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */
diff --git a/arch/powerpc/include/asm/ftrace.h b/arch/powerpc/include/asm/ftrace.h
index 1cd72700fbc0..b298f7a631e6 100644
--- a/arch/powerpc/include/asm/ftrace.h
+++ b/arch/powerpc/include/asm/ftrace.h
@@ -1,11 +1,6 @@
1#ifndef _ASM_POWERPC_FTRACE 1#ifndef _ASM_POWERPC_FTRACE
2#define _ASM_POWERPC_FTRACE 2#define _ASM_POWERPC_FTRACE
3 3
4#ifndef __ASSEMBLY__
5static inline void ftrace_nmi_enter(void) { }
6static inline void ftrace_nmi_exit(void) { }
7#endif
8
9#ifdef CONFIG_FUNCTION_TRACER 4#ifdef CONFIG_FUNCTION_TRACER
10#define MCOUNT_ADDR ((long)(_mcount)) 5#define MCOUNT_ADDR ((long)(_mcount))
11#define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */ 6#define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */
diff --git a/arch/sh/include/asm/ftrace.h b/arch/sh/include/asm/ftrace.h
index 31ada0370cb6..3aed362c9463 100644
--- a/arch/sh/include/asm/ftrace.h
+++ b/arch/sh/include/asm/ftrace.h
@@ -2,11 +2,6 @@
2#define __ASM_SH_FTRACE_H 2#define __ASM_SH_FTRACE_H
3 3
4#ifndef __ASSEMBLY__ 4#ifndef __ASSEMBLY__
5static inline void ftrace_nmi_enter(void) { }
6static inline void ftrace_nmi_exit(void) { }
7#endif
8
9#ifndef __ASSEMBLY__
10extern void mcount(void); 5extern void mcount(void);
11#endif 6#endif
12 7
diff --git a/arch/sparc/include/asm/ftrace.h b/arch/sparc/include/asm/ftrace.h
index 62055ac0496e..d27716cd38c1 100644
--- a/arch/sparc/include/asm/ftrace.h
+++ b/arch/sparc/include/asm/ftrace.h
@@ -1,11 +1,6 @@
1#ifndef _ASM_SPARC64_FTRACE 1#ifndef _ASM_SPARC64_FTRACE
2#define _ASM_SPARC64_FTRACE 2#define _ASM_SPARC64_FTRACE
3 3
4#ifndef __ASSEMBLY__
5static inline void ftrace_nmi_enter(void) { }
6static inline void ftrace_nmi_exit(void) { }
7#endif
8
9#ifdef CONFIG_MCOUNT 4#ifdef CONFIG_MCOUNT
10#define MCOUNT_ADDR ((long)(_mcount)) 5#define MCOUNT_ADDR ((long)(_mcount))
11#define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */ 6#define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */
diff --git a/arch/x86/include/asm/ftrace.h b/arch/x86/include/asm/ftrace.h
index a23468194b8c..f8173ed1c970 100644
--- a/arch/x86/include/asm/ftrace.h
+++ b/arch/x86/include/asm/ftrace.h
@@ -17,23 +17,7 @@ static inline unsigned long ftrace_call_adjust(unsigned long addr)
17 */ 17 */
18 return addr - 1; 18 return addr - 1;
19} 19}
20
21#ifdef CONFIG_DYNAMIC_FTRACE
22extern void ftrace_nmi_enter(void);
23extern void ftrace_nmi_exit(void);
24#else
25static inline void ftrace_nmi_enter(void) { }
26static inline void ftrace_nmi_exit(void) { }
27#endif
28#endif /* __ASSEMBLY__ */ 20#endif /* __ASSEMBLY__ */
29
30#else /* CONFIG_FUNCTION_TRACER */
31
32#ifndef __ASSEMBLY__
33static inline void ftrace_nmi_enter(void) { }
34static inline void ftrace_nmi_exit(void) { }
35#endif
36
37#endif /* CONFIG_FUNCTION_TRACER */ 21#endif /* CONFIG_FUNCTION_TRACER */
38 22
39#endif /* _ASM_X86_FTRACE_H */ 23#endif /* _ASM_X86_FTRACE_H */
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index e46a7b34037c..0ad1b48aea69 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -44,7 +44,6 @@ static inline void ftrace_kill(void) { }
44#endif /* CONFIG_FUNCTION_TRACER */ 44#endif /* CONFIG_FUNCTION_TRACER */
45 45
46#ifdef CONFIG_DYNAMIC_FTRACE 46#ifdef CONFIG_DYNAMIC_FTRACE
47
48enum { 47enum {
49 FTRACE_FL_FREE = (1 << 0), 48 FTRACE_FL_FREE = (1 << 0),
50 FTRACE_FL_FAILED = (1 << 1), 49 FTRACE_FL_FAILED = (1 << 1),
@@ -105,6 +104,8 @@ extern void ftrace_release(void *start, unsigned long size);
105 104
106extern void ftrace_disable_daemon(void); 105extern void ftrace_disable_daemon(void);
107extern void ftrace_enable_daemon(void); 106extern void ftrace_enable_daemon(void);
107extern void ftrace_nmi_enter(void);
108extern void ftrace_nmi_exit(void);
108 109
109#else 110#else
110# define skip_trace(ip) ({ 0; }) 111# define skip_trace(ip) ({ 0; })
@@ -113,6 +114,8 @@ extern void ftrace_enable_daemon(void);
113# define ftrace_disable_daemon() do { } while (0) 114# define ftrace_disable_daemon() do { } while (0)
114# define ftrace_enable_daemon() do { } while (0) 115# define ftrace_enable_daemon() do { } while (0)
115static inline void ftrace_release(void *start, unsigned long size) { } 116static inline void ftrace_release(void *start, unsigned long size) { }
117static inline void ftrace_nmi_enter(void) { }
118static inline void ftrace_nmi_exit(void) { }
116#endif /* CONFIG_DYNAMIC_FTRACE */ 119#endif /* CONFIG_DYNAMIC_FTRACE */
117 120
118/* totally disable ftrace - can not re-enable after this */ 121/* totally disable ftrace - can not re-enable after this */
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h
index 0087cb43becf..ffc16ab5a878 100644
--- a/include/linux/hardirq.h
+++ b/include/linux/hardirq.h
@@ -4,8 +4,8 @@
4#include <linux/preempt.h> 4#include <linux/preempt.h>
5#include <linux/smp_lock.h> 5#include <linux/smp_lock.h>
6#include <linux/lockdep.h> 6#include <linux/lockdep.h>
7#include <linux/ftrace.h>
7#include <asm/hardirq.h> 8#include <asm/hardirq.h>
8#include <asm/ftrace.h>
9#include <asm/system.h> 9#include <asm/system.h>
10 10
11/* 11/*