From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Kuo Subject: Re: [PATCH] kdump: Fix crash_kexec - smp_send_stop race in panic Date: Fri, 11 Nov 2011 11:45:06 -0600 Message-ID: <20111111174506.GE459@codeaurora.org> References: <1319639649.3321.11.camel@br98xy6r> <20111028161143.e5ebf617.akpm@linux-foundation.org> <1320055036.2796.8.camel@br98xy6r> <20111031033948.a0edb7f3.akpm@linux-foundation.org> <1320314844.2989.6.camel@br98xy6r> <20111109160400.cc2d27d9.akpm@linux-foundation.org> <1320934932.16425.14.camel@br98xy6r> <4EBBE9B4.3040009@tilera.com> <1321014494.2745.7.camel@br98xy6r> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1321014494.2745.7.camel@br98xy6r> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kexec-bounces-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org Errors-To: kexec-bounces+glkk-kexec=m.gmane.org-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: Michael Holzheu Cc: Benjamin Herrenschmidt , Heiko Carstens , David Howells , Chen Liqin , Paul Mackerras , "H. Peter Anvin" , Guan Xuetao , Lennox Wu , Hans-Christian Egtvedt , Jonas Bonn , Jesper Nilsson , Russell King , Yoshinori Sato , Richard Weinberger , Hirokazu Takata , "James E.J. Bottomley" , Ingo Molnar , Geert Uytterhoeven , linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Matt Turner , Vivek Goyal , Haavard Skinnemoen , Don Zickus List-Id: linux-arch.vger.kernel.org On Fri, Nov 11, 2011 at 01:28:14PM +0100, Michael Holzheu wrote: > Hello Chris, > > On Thu, 2011-11-10 at 10:11 -0500, Chris Metcalf wrote: > > On 11/10/2011 9:22 AM, Michael Holzheu wrote: > > [snip] > > > If a cleaner API seems useful (either for power reasons or restartability > > or whatever), I suppose a standard global function name could be specified > > that's the thing you execute when you get an smp_send_stop IPI (in tile's > > case it's "smp_stop_cpu_interrupt()") and the panic() code could instead > > just do an atomic_inc_return() of a global panic counter, and if it wasn't > > the first panicking cpu, call directly into the smp_stop handler routine to > > quiesce itself. Then the panicking cpu could finish whatever it needs to > > do and then halt, reboot, etc., all the cpus. > > Thanks for the info. So introducing a "weak" function that can stop the > CPU it is running on could solve the problem. Every architecture can > override the function with something appropriate. E.g. "tile" can use > the lower-power "nap" instruction there. > > What about the following patch. Hexagon uses interrupts to send the stop to the other CPU's as well, and we also have a stop local cpu operation defined, so I think we're in the same boat as tile. This patch should work for us. -- Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.