.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * SH specific backtracing code for oprofile |
---|
3 | 4 | * |
---|
.. | .. |
---|
7 | 8 | * |
---|
8 | 9 | * Based on ARM oprofile backtrace code by Richard Purdie and in turn, i386 |
---|
9 | 10 | * oprofile backtrace code by John Levon, David Smith |
---|
10 | | - * |
---|
11 | | - * This program is free software; you can redistribute it and/or modify |
---|
12 | | - * it under the terms of the GNU General Public License version 2 as |
---|
13 | | - * published by the Free Software Foundation. |
---|
14 | | - * |
---|
15 | 11 | */ |
---|
16 | 12 | #include <linux/oprofile.h> |
---|
17 | 13 | #include <linux/sched.h> |
---|
.. | .. |
---|
23 | 19 | #include <asm/sections.h> |
---|
24 | 20 | #include <asm/stacktrace.h> |
---|
25 | 21 | |
---|
26 | | -static int backtrace_stack(void *data, char *name) |
---|
27 | | -{ |
---|
28 | | - /* Yes, we want all stacks */ |
---|
29 | | - return 0; |
---|
30 | | -} |
---|
31 | | - |
---|
32 | 22 | static void backtrace_address(void *data, unsigned long addr, int reliable) |
---|
33 | 23 | { |
---|
34 | 24 | unsigned int *depth = data; |
---|
.. | .. |
---|
38 | 28 | } |
---|
39 | 29 | |
---|
40 | 30 | static struct stacktrace_ops backtrace_ops = { |
---|
41 | | - .stack = backtrace_stack, |
---|
42 | 31 | .address = backtrace_address, |
---|
43 | 32 | }; |
---|
44 | 33 | |
---|
.. | .. |
---|
51 | 40 | unsigned long buf_stack; |
---|
52 | 41 | |
---|
53 | 42 | /* Also check accessibility of address */ |
---|
54 | | - if (!access_ok(VERIFY_READ, stackaddr, sizeof(unsigned long))) |
---|
| 43 | + if (!access_ok(stackaddr, sizeof(unsigned long))) |
---|
55 | 44 | return NULL; |
---|
56 | 45 | |
---|
57 | 46 | if (__copy_from_user_inatomic(&buf_stack, stackaddr, sizeof(unsigned long))) |
---|