diff options
-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 | ||||
-rw-r--r-- | include/linux/ftrace.h | 1 | ||||
-rw-r--r-- | kernel/trace/ftrace.c | 9 |
6 files changed, 0 insertions, 65 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[]; |
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index ac58e94668b7..1c4835f86911 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
@@ -71,7 +71,6 @@ extern int ftrace_ip_converted(unsigned long ip); | |||
71 | extern unsigned char *ftrace_nop_replace(void); | 71 | extern unsigned char *ftrace_nop_replace(void); |
72 | extern unsigned char *ftrace_call_replace(unsigned long ip, unsigned long addr); | 72 | extern unsigned char *ftrace_call_replace(unsigned long ip, unsigned long addr); |
73 | extern int ftrace_dyn_arch_init(void *data); | 73 | extern int ftrace_dyn_arch_init(void *data); |
74 | extern int ftrace_mcount_set(unsigned long *data); | ||
75 | extern int ftrace_update_ftrace_func(ftrace_func_t func); | 74 | extern int ftrace_update_ftrace_func(ftrace_func_t func); |
76 | extern void ftrace_caller(void); | 75 | extern void ftrace_caller(void); |
77 | extern void ftrace_call(void); | 76 | extern void ftrace_call(void); |
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index e758cab0836f..226fd9132d53 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -620,7 +620,6 @@ static int ftrace_update_code(void *ignore); | |||
620 | 620 | ||
621 | static int __ftrace_modify_code(void *data) | 621 | static int __ftrace_modify_code(void *data) |
622 | { | 622 | { |
623 | unsigned long addr; | ||
624 | int *command = data; | 623 | int *command = data; |
625 | 624 | ||
626 | if (*command & FTRACE_ENABLE_CALLS) { | 625 | if (*command & FTRACE_ENABLE_CALLS) { |
@@ -639,14 +638,6 @@ static int __ftrace_modify_code(void *data) | |||
639 | if (*command & FTRACE_UPDATE_TRACE_FUNC) | 638 | if (*command & FTRACE_UPDATE_TRACE_FUNC) |
640 | ftrace_update_ftrace_func(ftrace_trace_function); | 639 | ftrace_update_ftrace_func(ftrace_trace_function); |
641 | 640 | ||
642 | if (*command & FTRACE_ENABLE_MCOUNT) { | ||
643 | addr = (unsigned long)ftrace_record_ip; | ||
644 | ftrace_mcount_set(&addr); | ||
645 | } else if (*command & FTRACE_DISABLE_MCOUNT) { | ||
646 | addr = (unsigned long)ftrace_stub; | ||
647 | ftrace_mcount_set(&addr); | ||
648 | } | ||
649 | |||
650 | return 0; | 641 | return 0; |
651 | } | 642 | } |
652 | 643 | ||