Re: [Kgdb-bugreport] Re: problem with kgdb_roundup_cpus() and ppc64
Status: Beta
Brought to you by:
jwessel
From: George A. <ge...@mv...> - 2005-08-30 14:55:15
|
Tom Rini wrote: > On Mon, Aug 29, 2005 at 04:39:23PM -0700, Tom Rini wrote: > >>On Mon, Aug 29, 2005 at 04:29:48PM -0700, Geoff Levand wrote: >> >> >>>I have a problem around kgdb_roundup_cpus() on ppc64 SMP. This >>>is the current implementation: >> >>[snip] >> >>>I did the following, and it seems to work OK, but I don't know enough of >>>the details to know the proper fix. Help would be appreciated. >>> >>>void kgdb_roundup_cpus(unsigned long flags) >>>{ >>> const unsigned long saved_flags = flags; >>> local_irq_restore((flags | MSR_EE)); >>> smp_call_function(kgdb_call_nmi_hook, 0, 0, 0); >>> local_irq_restore(flags); >>>} I clearly remember writting, yesterday, that smp_call_function() is a very poor choice here. This is what the orgional x86 code did and which I changed to send_nmi_all_but_self() because the smp_call_function() may not return. This is especially true if one of the other cpus is in a loop with ints off, which it may well be if it is trying to get a spin_lockirq which the current cpu holds. We ARE kgdb! We want results NOW. George -- >> >>This sounds like the same issue MIPS SMP has, and they fix it similarly. >>Ddo we need to or in MSR_EE 'tho? If not, I think the more correct fix >>is to provide a default, weak, kgdb_roundup_cpus that does this, take it >>out of MIPS as well, and be happy. I bet ppc32 would also be able to >>use this code, if KGDB&&SMP was tested & supported there. > > > Der, clearly, what I said doesn't make sense. > > But, why do we save flags to saved_flags ? Is there macro expansion I'm > missing? > -- George Anzinger ge...@mv... HRT (High-res-timers): http://sourceforge.net/projects/high-res-timers/ |