From patchwork Tue Sep 2 13:00:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Thompson X-Patchwork-Id: 4825531 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 96F689F50F for ; Tue, 2 Sep 2014 13:11:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 75514201C0 for ; Tue, 2 Sep 2014 13:11:43 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 53C3420155 for ; Tue, 2 Sep 2014 13:11:42 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XOnoI-0004Yy-7m; Tue, 02 Sep 2014 13:07:46 +0000 Received: from mail-we0-f175.google.com ([74.125.82.175]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XOnoE-0004FW-Kr for linux-arm-kernel@lists.infradead.org; Tue, 02 Sep 2014 13:07:43 +0000 Received: by mail-we0-f175.google.com with SMTP id k48so6917718wev.20 for ; Tue, 02 Sep 2014 06:07:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=5qkXBnPb1s9gM1Iokv8ileiwyhSdJ+wcjsvI8P85kPs=; b=UvmYud+sPXaMfoQ5A6gw3t03sqW39r8DrEifbbpaJj04msPylsZuTnxUiQOhEiQTVX aiQbxeUvemQDUq0T4SgBFcmmKc7UtPWx0tLWk4xFyZLIo0qfNon12CUFCKgpWpJnvjO8 yC5VffDy8qXJa2jcUeyIuYbbQYQEticNCRFnrDBtu1Rr9ZhXjrOwS1COWMFJAynr4rYh vLloSUBqKW/qjqgm5W9JP6ZUgtXnpj+0coNDyhco60L0IAIg/sJBXGB7AoWFuhsaLQHe QvM8H6ayEu5sHqi1se/lTNbmroKoMJFccOK7l1oWvjOkBdeoW532Jm7zYj6QoI0s6jl2 Jgqg== X-Gm-Message-State: ALoCoQmyOrihbWdoKrZDDtxIgOfPIn1mjUxLFxH1dt5VaIAk87bdKdOgxJgKF4HYyiU4hJ8YqeCO X-Received: by 10.180.208.111 with SMTP id md15mr27980077wic.3.1409663238832; Tue, 02 Sep 2014 06:07:18 -0700 (PDT) Received: from sundance.lan (cpc4-aztw19-0-0-cust157.18-1.cable.virginm.net. [82.33.25.158]) by mx.google.com with ESMTPSA id ec2sm34928892wib.19.2014.09.02.06.07.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Sep 2014 06:07:18 -0700 (PDT) From: Daniel Thompson To: Russell King Subject: [PATCH v11 12/19] serial: kgdb_nmi: No CON_ENABLED by default Date: Tue, 2 Sep 2014 14:00:46 +0100 Message-Id: <1409662853-29313-13-git-send-email-daniel.thompson@linaro.org> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1409662853-29313-1-git-send-email-daniel.thompson@linaro.org> References: <1408466769-20004-1-git-send-email-daniel.thompson@linaro.org> <1409662853-29313-1-git-send-email-daniel.thompson@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140902_060742_838460_6C1F3D46 X-CRM114-Status: GOOD ( 13.40 ) X-Spam-Score: -0.7 (/) Cc: Daniel Thompson , linaro-kernel@lists.linaro.org, Catalin Marinas , patches@linaro.org, kgdb-bugreport@lists.sourceforge.net, Linus Walleij , Nicolas Pitre , linux-kernel@vger.kernel.org, Frederic Weisbecker , Anton Vorontsov , Ben Dooks , John Stultz , Fabio Estevam , Colin Cross , kernel-team@android.com, Dave Martin , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP At present this console is selectively enabled/disabled by NULL checking arch_kgdb_ops.enable_nmi. In practice this requires the architecture dependant code to implement some kind of control (e.g. module arguments) to enable/disable the feature. The kernel already provide the perfectly adequade console= argument to do this. Let's us that instead, if nothing else, it makes any documentation architecture neutral. Signed-off-by: Daniel Thompson --- drivers/tty/serial/kgdb_nmi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/kgdb_nmi.c b/drivers/tty/serial/kgdb_nmi.c index 6ec7501..129dc5b 100644 --- a/drivers/tty/serial/kgdb_nmi.c +++ b/drivers/tty/serial/kgdb_nmi.c @@ -46,6 +46,8 @@ static atomic_t kgdb_nmi_num_readers = ATOMIC_INIT(0); static int kgdb_nmi_console_setup(struct console *co, char *options) { + arch_kgdb_ops.enable_nmi(1); + /* The NMI console uses the dbg_io_ops to issue console messages. To * avoid duplicate messages during kdb sessions we must inform kdb's * I/O utilities that messages sent to the console will automatically @@ -77,7 +79,7 @@ static struct console kgdb_nmi_console = { .setup = kgdb_nmi_console_setup, .write = kgdb_nmi_console_write, .device = kgdb_nmi_console_device, - .flags = CON_PRINTBUFFER | CON_ANYTIME | CON_ENABLED, + .flags = CON_PRINTBUFFER | CON_ANYTIME, .index = -1, }; @@ -354,7 +356,6 @@ int kgdb_register_nmi_console(void) } register_console(&kgdb_nmi_console); - arch_kgdb_ops.enable_nmi(1); return 0; err_drv_reg: