hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/arch/hexagon/kernel/kgdb.c
....@@ -1,21 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * arch/hexagon/kernel/kgdb.c - Hexagon KGDB Support
34 *
45 * 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.
196 */
207
218 #include <linux/irq.h>
....@@ -83,7 +70,7 @@
8370 { "syscall_nr", GDB_SIZEOF_REG, offsetof(struct pt_regs, syscall_nr)},
8471 };
8572
86
-struct kgdb_arch arch_kgdb_ops = {
73
+const struct kgdb_arch arch_kgdb_ops = {
8774 /* trap0(#0xDB) 0x0cdb0054 */
8875 .gdb_bpt_instr = {0x54, 0x00, 0xdb, 0x0c},
8976 };
....@@ -114,38 +101,6 @@
114101 {
115102 instruction_pointer(regs) = pc;
116103 }
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
149104
150105
151106 /* Not yet working */