Skip to contentSkip to conversation

arc: kernel: kgdb: add default implementation for kgdb_roundup_cpus()

PATCH In review Chen Gang 2 participants 3 messages Oct 24, 2013 – Oct 29, 2013 Synopsys ARC architecture

lore
Share & tools
lore

Chen Gang

author
#0 lore raw

PATCH 1/1 arc: kernel: kgdb: add default implementation for kgdb_roundup_cpus()

arc supports kgdb, but need update -- add function kgdb_roundup_cpus(), or can not pass compiling. At present, add the simple generic one just like other architectures(e.g. tile, mips ...).

The related error (with allmodconfig):

kernel/built-in.o: In function `kgdb_cpu_enter':
kernel/debug/debug_core.c:580: undefined reference to `kgdb_roundup_cpus'

---
 arch/arc/kernel/kgdb.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
arch/arc/kernel/kgdb.c +12 -0
index a7698fb..a2ff5c5 100644
@@ -196,6 +196,18 @@ void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long ip)
 	instruction_pointer(regs) = ip;
 }
 
+static void kgdb_call_nmi_hook(void *ignored)
+{
+	kgdb_nmicallback(raw_smp_processor_id(), NULL);
+}
+
+void kgdb_roundup_cpus(unsigned long flags)
+{
+	local_irq_enable();
+	smp_call_function(kgdb_call_nmi_hook, NULL, 0);
+	local_irq_disable();
+}
+
 struct kgdb_arch arch_kgdb_ops = {
 	/* breakpoint instruction: TRAP_S 0x3 */
 #ifdef CONFIG_CPU_BIG_ENDIAN
Signature · 1 line
1.7.7.6
#1 lore raw
Quoted 11 lines · Chen Gang

arc supports kgdb, but need update -- add function kgdb_roundup_cpus(), or can not pass compiling. At present, add the simple generic one just like other architectures(e.g. tile, mips ...).

The related error (with allmodconfig):

kernel/built-in.o: In function `kgdb_cpu_enter':
kernel/debug/debug_core.c:580: undefined reference to `kgdb_roundup_cpus'

Applied for 3.13.

Thx,
-Vineet

author
#2 lore raw
Quoted 7 lines · Vineet Gupta
Quoted 6 lines · Chen Gang

arc supports kgdb, but need update -- add function kgdb_roundup_cpus(), or can not pass compiling. At present, add the simple generic one just like other architectures(e.g. tile, mips ...).

The related error (with allmodconfig):

Quoted 8 lines
Quoted 5 lines

kernel/built-in.o: In function `kgdb_cpu_enter':
kernel/debug/debug_core.c:580: undefined reference to `kgdb_roundup_cpus'

Applied for 3.13.

Thanks.

Signature · 1 line
Chen Gang