kgdb: timeout if secondary CPUs ignore the roundup
Currently if an active CPU fails to respond to a roundup request the CPU that requested the roundup will become stuck. This needlessly reduces the robustness of the debugger. This patch introduces a timeout allowing the system state to be examined even when the system contains unresponsive processors. It also modifies kdb's cpu command to make it censor attempts to switch to unresponsive processors and to report their state as (D)ead. Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org> Cc: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
This commit is contained in:

committed by
Jason Wessel

parent
b8017177cd
commit
a1465d2f39
@@ -2201,6 +2201,8 @@ static void kdb_cpu_status(void)
|
||||
for (start_cpu = -1, i = 0; i < NR_CPUS; i++) {
|
||||
if (!cpu_online(i)) {
|
||||
state = 'F'; /* cpu is offline */
|
||||
} else if (!kgdb_info[i].enter_kgdb) {
|
||||
state = 'D'; /* cpu is online but unresponsive */
|
||||
} else {
|
||||
state = ' '; /* cpu is responding to kdb */
|
||||
if (kdb_task_state_char(KDB_TSK(i)) == 'I')
|
||||
@@ -2254,7 +2256,7 @@ static int kdb_cpu(int argc, const char **argv)
|
||||
/*
|
||||
* Validate cpunum
|
||||
*/
|
||||
if ((cpunum > NR_CPUS) || !cpu_online(cpunum))
|
||||
if ((cpunum > NR_CPUS) || !kgdb_info[cpunum].enter_kgdb)
|
||||
return KDB_BADCPUNUM;
|
||||
|
||||
dbg_switch_cpu = cpunum;
|
||||
|
Reference in New Issue
Block a user