forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-09 05e59e5fb0064c97a1c10921ecd549f2d4a58565
kernel/arch/sh/oprofile/backtrace.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * SH specific backtracing code for oprofile
34 *
....@@ -7,11 +8,6 @@
78 *
89 * Based on ARM oprofile backtrace code by Richard Purdie and in turn, i386
910 * 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
- *
1511 */
1612 #include <linux/oprofile.h>
1713 #include <linux/sched.h>
....@@ -23,12 +19,6 @@
2319 #include <asm/sections.h>
2420 #include <asm/stacktrace.h>
2521
26
-static int backtrace_stack(void *data, char *name)
27
-{
28
- /* Yes, we want all stacks */
29
- return 0;
30
-}
31
-
3222 static void backtrace_address(void *data, unsigned long addr, int reliable)
3323 {
3424 unsigned int *depth = data;
....@@ -38,7 +28,6 @@
3828 }
3929
4030 static struct stacktrace_ops backtrace_ops = {
41
- .stack = backtrace_stack,
4231 .address = backtrace_address,
4332 };
4433
....@@ -51,7 +40,7 @@
5140 unsigned long buf_stack;
5241
5342 /* Also check accessibility of address */
54
- if (!access_ok(VERIFY_READ, stackaddr, sizeof(unsigned long)))
43
+ if (!access_ok(stackaddr, sizeof(unsigned long)))
5544 return NULL;
5645
5746 if (__copy_from_user_inatomic(&buf_stack, stackaddr, sizeof(unsigned long)))