forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/arch/sh/kernel/kgdb.c
....@@ -1,13 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0
12 /*
23 * SuperH KGDB support
34 *
45 * Copyright (C) 2008 - 2012 Paul Mundt
56 *
67 * Single stepping taken from the old stub by Henry Bell and Jeremy Siegel.
7
- *
8
- * This file is subject to the terms and conditions of the GNU General Public
9
- * License. See the file "COPYING" in the main directory of this archive
10
- * for more details.
118 */
129 #include <linux/kgdb.h>
1310 #include <linux/kdebug.h>
....@@ -269,6 +266,7 @@
269266 ptr = &remcomInBuffer[1];
270267 if (kgdb_hex2long(&ptr, &addr))
271268 linux_regs->pc = addr;
269
+ fallthrough;
272270 case 'D':
273271 case 'k':
274272 atomic_set(&kgdb_cpu_doing_single_step, -1);
....@@ -312,18 +310,6 @@
312310 regs->pc -= instruction_size(__raw_readw(regs->pc - 4));
313311 kgdb_handle_exception(0, SIGTRAP, 0, regs);
314312 local_irq_restore(flags);
315
-}
316
-
317
-static void kgdb_call_nmi_hook(void *ignored)
318
-{
319
- kgdb_nmicallback(raw_smp_processor_id(), get_irq_regs());
320
-}
321
-
322
-void kgdb_roundup_cpus(unsigned long flags)
323
-{
324
- local_irq_enable();
325
- smp_call_function(kgdb_call_nmi_hook, NULL, 0);
326
- local_irq_disable();
327313 }
328314
329315 static int __kgdb_notify(struct die_args *args, unsigned long cmd)
....@@ -382,7 +368,7 @@
382368 unregister_die_notifier(&kgdb_notifier);
383369 }
384370
385
-struct kgdb_arch arch_kgdb_ops = {
371
+const struct kgdb_arch arch_kgdb_ops = {
386372 /* Breakpoint instruction: trapa #0x3c */
387373 #ifdef CONFIG_CPU_LITTLE_ENDIAN
388374 .gdb_bpt_instr = { 0x3c, 0xc3 },