| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0 |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * SuperH KGDB support |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2008 - 2012 Paul Mundt |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * 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. |
|---|
| 11 | 8 | */ |
|---|
| 12 | 9 | #include <linux/kgdb.h> |
|---|
| 13 | 10 | #include <linux/kdebug.h> |
|---|
| .. | .. |
|---|
| 269 | 266 | ptr = &remcomInBuffer[1]; |
|---|
| 270 | 267 | if (kgdb_hex2long(&ptr, &addr)) |
|---|
| 271 | 268 | linux_regs->pc = addr; |
|---|
| 269 | + fallthrough; |
|---|
| 272 | 270 | case 'D': |
|---|
| 273 | 271 | case 'k': |
|---|
| 274 | 272 | atomic_set(&kgdb_cpu_doing_single_step, -1); |
|---|
| .. | .. |
|---|
| 312 | 310 | regs->pc -= instruction_size(__raw_readw(regs->pc - 4)); |
|---|
| 313 | 311 | kgdb_handle_exception(0, SIGTRAP, 0, regs); |
|---|
| 314 | 312 | 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(); |
|---|
| 327 | 313 | } |
|---|
| 328 | 314 | |
|---|
| 329 | 315 | static int __kgdb_notify(struct die_args *args, unsigned long cmd) |
|---|
| .. | .. |
|---|
| 382 | 368 | unregister_die_notifier(&kgdb_notifier); |
|---|
| 383 | 369 | } |
|---|
| 384 | 370 | |
|---|
| 385 | | -struct kgdb_arch arch_kgdb_ops = { |
|---|
| 371 | +const struct kgdb_arch arch_kgdb_ops = { |
|---|
| 386 | 372 | /* Breakpoint instruction: trapa #0x3c */ |
|---|
| 387 | 373 | #ifdef CONFIG_CPU_LITTLE_ENDIAN |
|---|
| 388 | 374 | .gdb_bpt_instr = { 0x3c, 0xc3 }, |
|---|