Skip to content

Commit

Permalink
arc: kgdb: add default implementation for kgdb_roundup_cpus()
Browse files Browse the repository at this point in the history
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'

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
  • Loading branch information
Chen Gang authored and Vineet Gupta committed Nov 6, 2013
1 parent 0a4c40a commit 3d01c1c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions arch/arc/kernel/kgdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3d01c1c

Please sign in to comment.