From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757678AbaEFOHc (ORCPT ); Tue, 6 May 2014 10:07:32 -0400 Received: from cantor2.suse.de ([195.135.220.15]:38630 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754309AbaEFOH3 (ORCPT ); Tue, 6 May 2014 10:07:29 -0400 Date: Tue, 06 May 2014 16:07:28 +0200 Message-ID: From: Takashi Iwai To: David Herrmann Cc: Daniel Vetter , dri-devel , Linux Kernel Mailing List Subject: Re: Atomicity in KMS panic notifier In-Reply-To: References: User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Tue, 6 May 2014 15:53:32 +0200, David Herrmann wrote: > > Hi > > On Tue, May 6, 2014 at 3:38 PM, Takashi Iwai wrote: > > At Tue, 6 May 2014 15:32:21 +0200, > > David Herrmann wrote: > >> fbcon is called through the VT or fbdev layer, which is called by > >> bust_spinlocks(1) via either unblank_screen() or console_unblank(). > > > > You mean bust_spinlocks(0), right? > > > > void __attribute__((weak)) bust_spinlocks(int yes) > > { > > if (yes) { > > ++oops_in_progress; > > } else { > > #ifdef CONFIG_VT > > unblank_screen(); > > #endif > > console_unblank(); > > if (--oops_in_progress == 0) > > wake_up_klogd(); > > } > > } > > > > bust_spinlocks(0) is called after the notifier chain, and it's almost > > at the end of panic(). > > Yes, it's called _after_ the panic-handlers but _before_ > console_unlock() (see console_unblank() in printk.c). Therefore, we > call into set_config() before the serial drivers get the panic-message > (flushed via console_unlock()). If the serial drivers (or whatever you > use for debugging) register their own panic-handlers, then they're > fine of course. Thanks for clarification. I see it's at the sensible place. FWIW, the problem I'm tackling now is the blockage of other panic notifiers due to drm_fb. For example, pvpanic isn't executed reliably because of this when a KMS (either cirrus or qxl) driver is loaded. So, for me, it's fine that the system stalls after that point :) Takashi