Re: [PATCH] [kgdb] Switch master cpu after gdb thread command forSMP (v4)

From: Andrew Morton
Date: Thu Feb 19 2009 - 19:56:18 EST


On Wed, 18 Feb 2009 17:37:54 +0800
sonic zhang <sonic.adi@xxxxxxxxx> wrote:

> This is the updated kgdb SMP patch, which is tested on blackfin bf561 dual core
> system. A new bug is fixed, which causes debugging halt in SMP kernel if a
> breakpoint is hit and cpu is switched in gdb before continue running kernel.
>
> In blackfin SMP architecture, different core has its own L1 SRAM and MMR
> memory, which code running on the other core can't access. In current kgdb
> impelemntation, cpus are represented by thread with minus prefix.
>
> If user run thread command in gdb to switch to the thread of the other cpu,
> kgdb should:
> 1. send IPI signal to master cpu
> 2. release the specific passive cpu waiting in IPI handler
> 3. exit kgdb exception loop on master cpu and trap into kgdb wait in IPI handler
> 4. trap the released passive cpu into kgdb exception in IPI handler
>

x86_64 allmodconfig:

kernel/kgdb.c: In function 'kgdb_wait':
kernel/kgdb.c:589: error: 'KGDB_THR_PROC_SWAP' undeclared (first use in this function)
kernel/kgdb.c:589: error: (Each undeclared identifier is reported only once
kernel/kgdb.c:589: error: for each function it appears in.)
kernel/kgdb.c: In function 'gdb_cmd_query':
kernel/kgdb.c:1087: error: 'KGDB_THR_PROC_SWAP' undeclared (first use in this function)
kernel/kgdb.c: In function 'gdb_cmd_task':
kernel/kgdb.c:1113: error: 'KGDB_THR_PROC_SWAP' undeclared (first use in this function)
kernel/kgdb.c: In function 'gdb_cmd_thread':
kernel/kgdb.c:1163: error: 'KGDB_THR_PROC_SWAP' undeclared (first use in this function)
kernel/kgdb.c: In function 'gdb_serial_stub':
kernel/kgdb.c:1275: error: 'KGDB_THR_PROC_SWAP' undeclared (first use in this function)
kernel/kgdb.c: In function 'kgdb_handle_exception':
kernel/kgdb.c:1575: error: 'KGDB_THR_PROC_SWAP' undeclared (first use in this function)
kernel/kgdb.c: In function 'kgdb_nmicallback':
kernel/kgdb.c:1606: warning: suggest parentheses around && within ||
kernel/kgdb.c:1606: warning: suggest parentheses around && within ||
kernel/kgdb.c:1606: warning: suggest parentheses around && within ||
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/