.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * arch/hexagon/kernel/kgdb.c - Hexagon KGDB Support |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (c) 2011-2012, The Linux Foundation. All rights reserved. |
---|
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 and |
---|
8 | | - * only version 2 as published by the Free Software Foundation. |
---|
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., 51 Franklin Street, Fifth Floor, Boston, MA |
---|
18 | | - * 02110-1301, USA. |
---|
19 | 6 | */ |
---|
20 | 7 | |
---|
21 | 8 | #include <linux/irq.h> |
---|
.. | .. |
---|
83 | 70 | { "syscall_nr", GDB_SIZEOF_REG, offsetof(struct pt_regs, syscall_nr)}, |
---|
84 | 71 | }; |
---|
85 | 72 | |
---|
86 | | -struct kgdb_arch arch_kgdb_ops = { |
---|
| 73 | +const struct kgdb_arch arch_kgdb_ops = { |
---|
87 | 74 | /* trap0(#0xDB) 0x0cdb0054 */ |
---|
88 | 75 | .gdb_bpt_instr = {0x54, 0x00, 0xdb, 0x0c}, |
---|
89 | 76 | }; |
---|
.. | .. |
---|
114 | 101 | { |
---|
115 | 102 | instruction_pointer(regs) = pc; |
---|
116 | 103 | } |
---|
117 | | - |
---|
118 | | -#ifdef CONFIG_SMP |
---|
119 | | - |
---|
120 | | -/** |
---|
121 | | - * kgdb_roundup_cpus - Get other CPUs into a holding pattern |
---|
122 | | - * @flags: Current IRQ state |
---|
123 | | - * |
---|
124 | | - * On SMP systems, we need to get the attention of the other CPUs |
---|
125 | | - * and get them be in a known state. This should do what is needed |
---|
126 | | - * to get the other CPUs to call kgdb_wait(). Note that on some arches, |
---|
127 | | - * the NMI approach is not used for rounding up all the CPUs. For example, |
---|
128 | | - * in case of MIPS, smp_call_function() is used to roundup CPUs. In |
---|
129 | | - * this case, we have to make sure that interrupts are enabled before |
---|
130 | | - * calling smp_call_function(). The argument to this function is |
---|
131 | | - * the flags that will be used when restoring the interrupts. There is |
---|
132 | | - * local_irq_save() call before kgdb_roundup_cpus(). |
---|
133 | | - * |
---|
134 | | - * On non-SMP systems, this is not called. |
---|
135 | | - */ |
---|
136 | | - |
---|
137 | | -static void hexagon_kgdb_nmi_hook(void *ignored) |
---|
138 | | -{ |
---|
139 | | - kgdb_nmicallback(raw_smp_processor_id(), get_irq_regs()); |
---|
140 | | -} |
---|
141 | | - |
---|
142 | | -void kgdb_roundup_cpus(unsigned long flags) |
---|
143 | | -{ |
---|
144 | | - local_irq_enable(); |
---|
145 | | - smp_call_function(hexagon_kgdb_nmi_hook, NULL, 0); |
---|
146 | | - local_irq_disable(); |
---|
147 | | -} |
---|
148 | | -#endif |
---|
149 | 104 | |
---|
150 | 105 | |
---|
151 | 106 | /* Not yet working */ |
---|