forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/arch/ia64/kernel/kprobes.c
....@@ -1,20 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Kernel Probes (KProbes)
34 * arch/ia64/kernel/kprobes.c
4
- *
5
- * This program is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation; either version 2 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program; if not, write to the Free Software
17
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
185 *
196 * Copyright (C) IBM Corporation, 2002, 2004
207 * Copyright (C) Intel Corporation, 2005
....@@ -30,8 +17,8 @@
3017 #include <linux/preempt.h>
3118 #include <linux/extable.h>
3219 #include <linux/kdebug.h>
20
+#include <linux/pgtable.h>
3321
34
-#include <asm/pgtable.h>
3522 #include <asm/sections.h>
3623 #include <asm/exception.h>
3724
....@@ -782,7 +769,7 @@
782769 return 1;
783770 }
784771
785
-#if !defined(CONFIG_PREEMPT)
772
+#if !defined(CONFIG_PREEMPTION)
786773 if (p->ainsn.inst_flag == INST_FLAG_BOOSTABLE && !p->post_handler) {
787774 /* Boost up -- we can execute copied instructions directly */
788775 ia64_psr(regs)->ri = p->ainsn.slot;
....@@ -918,32 +905,6 @@
918905 break;
919906 }
920907 return ret;
921
-}
922
-
923
-struct param_bsp_cfm {
924
- unsigned long ip;
925
- unsigned long *bsp;
926
- unsigned long cfm;
927
-};
928
-
929
-static void ia64_get_bsp_cfm(struct unw_frame_info *info, void *arg)
930
-{
931
- unsigned long ip;
932
- struct param_bsp_cfm *lp = arg;
933
-
934
- do {
935
- unw_get_ip(info, &ip);
936
- if (ip == 0)
937
- break;
938
- if (ip == lp->ip) {
939
- unw_get_bsp(info, (unsigned long*)&lp->bsp);
940
- unw_get_cfm(info, (unsigned long*)&lp->cfm);
941
- return;
942
- }
943
- } while (unw_unwind(info) >= 0);
944
- lp->bsp = NULL;
945
- lp->cfm = 0;
946
- return;
947908 }
948909
949910 unsigned long arch_deref_entry_point(void *entry)