diff options
author | Steven Rostedt <rostedt@goodmis.org> | 2008-10-23 09:33:06 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-23 10:00:23 -0400 |
commit | 4d296c24326783bff1282ac72f310d8bac8df413 (patch) | |
tree | 75751fdafc0fa5818a926478e78dd9e54f1cf872 /arch | |
parent | cb7be3b2fc2cf089ee52b16f0fd9ebb29e9944e1 (diff) |
ftrace: remove mcount set
The arch dependent function ftrace_mcount_set was only used by the daemon
start up code. This patch removes it.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/kernel/ftrace.c | 13 | ||||
-rw-r--r-- | arch/powerpc/kernel/ftrace.c | 17 | ||||
-rw-r--r-- | arch/sparc64/kernel/ftrace.c | 18 | ||||
-rw-r--r-- | arch/x86/kernel/ftrace.c | 7 |
4 files changed, 0 insertions, 55 deletions
diff --git a/arch/arm/kernel/ftrace.c b/arch/arm/kernel/ftrace.c index 76d50e6091bc..6c90479e8974 100644 --- a/arch/arm/kernel/ftrace.c +++ b/arch/arm/kernel/ftrace.c | |||
@@ -95,19 +95,6 @@ int ftrace_update_ftrace_func(ftrace_func_t func) | |||
95 | return ret; | 95 | return ret; |
96 | } | 96 | } |
97 | 97 | ||
98 | int ftrace_mcount_set(unsigned long *data) | ||
99 | { | ||
100 | unsigned long pc, old; | ||
101 | unsigned long *addr = data; | ||
102 | unsigned char *new; | ||
103 | |||
104 | pc = (unsigned long)&mcount_call; | ||
105 | memcpy(&old, &mcount_call, MCOUNT_INSN_SIZE); | ||
106 | new = ftrace_call_replace(pc, *addr); | ||
107 | *addr = ftrace_modify_code(pc, (unsigned char *)&old, new); | ||
108 | return 0; | ||
109 | } | ||
110 | |||
111 | /* run from kstop_machine */ | 98 | /* run from kstop_machine */ |
112 | int __init ftrace_dyn_arch_init(void *data) | 99 | int __init ftrace_dyn_arch_init(void *data) |
113 | { | 100 | { |
diff --git a/arch/powerpc/kernel/ftrace.c b/arch/powerpc/kernel/ftrace.c index 3855ceb937b0..6b75522e8b34 100644 --- a/arch/powerpc/kernel/ftrace.c +++ b/arch/powerpc/kernel/ftrace.c | |||
@@ -126,23 +126,6 @@ notrace int ftrace_update_ftrace_func(ftrace_func_t func) | |||
126 | return ret; | 126 | return ret; |
127 | } | 127 | } |
128 | 128 | ||
129 | notrace int ftrace_mcount_set(unsigned long *data) | ||
130 | { | ||
131 | unsigned long ip = (long)(&mcount_call); | ||
132 | unsigned long *addr = data; | ||
133 | unsigned char old[MCOUNT_INSN_SIZE], *new; | ||
134 | |||
135 | /* | ||
136 | * Replace the mcount stub with a pointer to the | ||
137 | * ip recorder function. | ||
138 | */ | ||
139 | memcpy(old, &mcount_call, MCOUNT_INSN_SIZE); | ||
140 | new = ftrace_call_replace(ip, *addr); | ||
141 | *addr = ftrace_modify_code(ip, old, new); | ||
142 | |||
143 | return 0; | ||
144 | } | ||
145 | |||
146 | int __init ftrace_dyn_arch_init(void *data) | 129 | int __init ftrace_dyn_arch_init(void *data) |
147 | { | 130 | { |
148 | /* This is running in kstop_machine */ | 131 | /* This is running in kstop_machine */ |
diff --git a/arch/sparc64/kernel/ftrace.c b/arch/sparc64/kernel/ftrace.c index 4298d0aee713..447942041a7c 100644 --- a/arch/sparc64/kernel/ftrace.c +++ b/arch/sparc64/kernel/ftrace.c | |||
@@ -69,24 +69,6 @@ notrace int ftrace_update_ftrace_func(ftrace_func_t func) | |||
69 | return ftrace_modify_code(ip, old, new); | 69 | return ftrace_modify_code(ip, old, new); |
70 | } | 70 | } |
71 | 71 | ||
72 | notrace int ftrace_mcount_set(unsigned long *data) | ||
73 | { | ||
74 | unsigned long ip = (long)(&mcount_call); | ||
75 | unsigned long *addr = data; | ||
76 | unsigned char old[MCOUNT_INSN_SIZE], *new; | ||
77 | |||
78 | /* | ||
79 | * Replace the mcount stub with a pointer to the | ||
80 | * ip recorder function. | ||
81 | */ | ||
82 | memcpy(old, &mcount_call, MCOUNT_INSN_SIZE); | ||
83 | new = ftrace_call_replace(ip, *addr); | ||
84 | *addr = ftrace_modify_code(ip, old, new); | ||
85 | |||
86 | return 0; | ||
87 | } | ||
88 | |||
89 | |||
90 | int __init ftrace_dyn_arch_init(void *data) | 72 | int __init ftrace_dyn_arch_init(void *data) |
91 | { | 73 | { |
92 | ftrace_mcount_set(data); | 74 | ftrace_mcount_set(data); |
diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c index da4fb0deecf7..b399eed23538 100644 --- a/arch/x86/kernel/ftrace.c +++ b/arch/x86/kernel/ftrace.c | |||
@@ -103,13 +103,6 @@ notrace int ftrace_update_ftrace_func(ftrace_func_t func) | |||
103 | return ret; | 103 | return ret; |
104 | } | 104 | } |
105 | 105 | ||
106 | notrace int ftrace_mcount_set(unsigned long *data) | ||
107 | { | ||
108 | /* mcount is initialized as a nop */ | ||
109 | *data = 0; | ||
110 | return 0; | ||
111 | } | ||
112 | |||
113 | int __init ftrace_dyn_arch_init(void *data) | 106 | int __init ftrace_dyn_arch_init(void *data) |
114 | { | 107 | { |
115 | extern const unsigned char ftrace_test_p6nop[]; | 108 | extern const unsigned char ftrace_test_p6nop[]; |