forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-09-20 a36159eec6ca17402b0e146b86efaf76568dc353
kernel/arch/arc/kernel/kgdb.c
....@@ -1,11 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * kgdb support for ARC
34 *
45 * Copyright (C) 2012 Synopsys, Inc. (www.synopsys.com)
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 as
8
- * published by the Free Software Foundation.
96 */
107
118 #include <linux/kgdb.h>
....@@ -192,19 +189,13 @@
192189 instruction_pointer(regs) = ip;
193190 }
194191
195
-static void kgdb_call_nmi_hook(void *ignored)
192
+void kgdb_call_nmi_hook(void *ignored)
196193 {
194
+ /* Default implementation passes get_irq_regs() but we don't */
197195 kgdb_nmicallback(raw_smp_processor_id(), NULL);
198196 }
199197
200
-void kgdb_roundup_cpus(unsigned long flags)
201
-{
202
- local_irq_enable();
203
- smp_call_function(kgdb_call_nmi_hook, NULL, 0);
204
- local_irq_disable();
205
-}
206
-
207
-struct kgdb_arch arch_kgdb_ops = {
198
+const struct kgdb_arch arch_kgdb_ops = {
208199 /* breakpoint instruction: TRAP_S 0x3 */
209200 #ifdef CONFIG_CPU_BIG_ENDIAN
210201 .gdb_bpt_instr = {0x78, 0x7e},