rounding up CPUs on debug exception

Haren Myneni haren at
Tue Sep 27 05:18:20 EST 2005

Geoff Levand wrote:

>When kgdb handles a debugging exception (trap or trace for ppc) it 
>tries to stop execution on the other CPUs as soon as possible so 
>that changes in the system state from the time of the exception 
>are minimized.  The i386 code (below) uses the inter-processor 
>interrupt features of the APIC interrupt controller to send a 
>high priority NMI to the other CPUs.  An NMI is needed here, 
>since another CPU may be waiting with interrupts disabled on a 
>spin lock the current cpu holds.
>void kgdb_roundup_cpus(unsigned long flags)
>	send_IPI_allbutself(APIC_DM_NMI);
>I need something similar to support SMP on ppc64.  Can anyone 
>suggest something?
Unfortunately, there is no software NMI support on PPC64.  It would be 
better to have this feature.

However, the user can do soft-reset manually to bring all CPUs into 
debugger as xmon does. For this, kgdb has to be modified such it handles 
the re-entrant of CPUs which are already responded to an IPI.  I 
believe, you can re-use some functions (long_jmp and set_jmp) defined 
for xmon.


>Linuxppc64-dev mailing list
>Linuxppc64-dev at

More information about the Linuxppc64-dev mailing list