Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755250Ab2HAVEs (ORCPT ); Wed, 1 Aug 2012 17:04:48 -0400 Received: from mail-gh0-f174.google.com ([209.85.160.174]:58226 "EHLO mail-gh0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753825Ab2HAVEq (ORCPT ); Wed, 1 Aug 2012 17:04:46 -0400 Date: Wed, 1 Aug 2012 14:02:31 -0700 From: Anton Vorontsov To: Colin Cross Cc: Russell King , Jason Wessel , Greg Kroah-Hartman , Alan Cox , Arve =?utf-8?B?SGrDuG5uZXbDpWc=?= , John Stultz , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linaro-kernel@lists.linaro.org, patches@linaro.org, kernel-team@android.com, kgdb-bugreport@lists.sourceforge.net Subject: Re: [PATCH 03/11] kdb: Implement disable_nmi command Message-ID: <20120801210231.GC20714@lizard> References: <20120730115719.GA5742@lizard> <1343649500-18491-3-git-send-email-anton.vorontsov@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1715 Lines: 38 On Mon, Jul 30, 2012 at 10:33:34AM -0700, Colin Cross wrote: > On Mon, Jul 30, 2012 at 4:58 AM, Anton Vorontsov > wrote: > > This command disables NMI-entry. If NMI source was previously shared with > > a serial console ("debug port"), this effectively releases the port from > > KDB exclusive use, and makes the console available for normal use. > > > > Of course, NMI can be reenabled, enable_nmi modparam is used for that: > > > > echo 1 > /sys/module/kdb/parameters/enable_nmi > > This is very different behavior from the FIQ debugger "console" > command you are trying to replace. In the FIQ debugger, everything > goes through the FIQ/NMI, even when in console mode. That means that > the user can always get back to FIQ debugger/KDB mode using a special > sequence (we use a break character). With your implementation, if you > switch from KDB to console to see if the console is working, and find > that it is not working, you can never get back into KDB. Ah, I see. But with disable_nmi, in addition to kernel console, applications can use /dev/ttyXX as normal, and with 'console' command that is not possible (at least w/o modifying applications to escape magic sequence). So, I think we should have both commands, each would handle its own use case. (Initially I just tried to avoid adding another console driver, but it seems there is no other way, heh.) Thanks! -- Anton Vorontsov Email: cbouatmailru@gmail.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/