diff options
Diffstat (limited to 'arch/s390/kernel/ftrace.c')
-rw-r--r-- | arch/s390/kernel/ftrace.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/s390/kernel/ftrace.c b/arch/s390/kernel/ftrace.c index 6c79f1b44fe7..e0eaf11134b4 100644 --- a/arch/s390/kernel/ftrace.c +++ b/arch/s390/kernel/ftrace.c | |||
@@ -130,8 +130,7 @@ int ftrace_make_nop(struct module *mod, struct dyn_ftrace *rec, | |||
130 | /* Verify that the to be replaced code matches what we expect. */ | 130 | /* Verify that the to be replaced code matches what we expect. */ |
131 | if (memcmp(&orig, &old, sizeof(old))) | 131 | if (memcmp(&orig, &old, sizeof(old))) |
132 | return -EINVAL; | 132 | return -EINVAL; |
133 | if (probe_kernel_write((void *) rec->ip, &new, sizeof(new))) | 133 | s390_kernel_write((void *) rec->ip, &new, sizeof(new)); |
134 | return -EPERM; | ||
135 | return 0; | 134 | return 0; |
136 | } | 135 | } |
137 | 136 | ||
@@ -159,8 +158,7 @@ int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr) | |||
159 | /* Verify that the to be replaced code matches what we expect. */ | 158 | /* Verify that the to be replaced code matches what we expect. */ |
160 | if (memcmp(&orig, &old, sizeof(old))) | 159 | if (memcmp(&orig, &old, sizeof(old))) |
161 | return -EINVAL; | 160 | return -EINVAL; |
162 | if (probe_kernel_write((void *) rec->ip, &new, sizeof(new))) | 161 | s390_kernel_write((void *) rec->ip, &new, sizeof(new)); |
163 | return -EPERM; | ||
164 | return 0; | 162 | return 0; |
165 | } | 163 | } |
166 | 164 | ||
@@ -231,14 +229,16 @@ int ftrace_enable_ftrace_graph_caller(void) | |||
231 | { | 229 | { |
232 | u8 op = 0x04; /* set mask field to zero */ | 230 | u8 op = 0x04; /* set mask field to zero */ |
233 | 231 | ||
234 | return probe_kernel_write(__va(ftrace_graph_caller)+1, &op, sizeof(op)); | 232 | s390_kernel_write(__va(ftrace_graph_caller)+1, &op, sizeof(op)); |
233 | return 0; | ||
235 | } | 234 | } |
236 | 235 | ||
237 | int ftrace_disable_ftrace_graph_caller(void) | 236 | int ftrace_disable_ftrace_graph_caller(void) |
238 | { | 237 | { |
239 | u8 op = 0xf4; /* set mask field to all ones */ | 238 | u8 op = 0xf4; /* set mask field to all ones */ |
240 | 239 | ||
241 | return probe_kernel_write(__va(ftrace_graph_caller)+1, &op, sizeof(op)); | 240 | s390_kernel_write(__va(ftrace_graph_caller)+1, &op, sizeof(op)); |
241 | return 0; | ||
242 | } | 242 | } |
243 | 243 | ||
244 | #endif /* CONFIG_FUNCTION_GRAPH_TRACER */ | 244 | #endif /* CONFIG_FUNCTION_GRAPH_TRACER */ |