From patchwork Tue Aug 19 16:46:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Thompson X-Patchwork-Id: 4744881 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EABE2C033A for ; Tue, 19 Aug 2014 17:01:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D68032015A for ; Tue, 19 Aug 2014 17:01:23 +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 D29B02015E for ; Tue, 19 Aug 2014 17:01:22 +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 1XJmjM-0007TE-66; Tue, 19 Aug 2014 16:57:56 +0000 Received: from mail-wi0-f182.google.com ([209.85.212.182]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XJmjI-0007La-3p for linux-arm-kernel@lists.infradead.org; Tue, 19 Aug 2014 16:57:52 +0000 Received: by mail-wi0-f182.google.com with SMTP id d1so5623752wiv.15 for ; Tue, 19 Aug 2014 09:57:27 -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=MoYxgLW9qRweXrIwv2Q/xQ0Sv66kiPKUN3DZGlIogMPLf5nzG5b2cXcbT38/Aa2fbX lr3FnCD89UHeP+o4nMUlNkxRawI52pOQCxNZM0HvMa6P+vPjGbhrVK1W+cDI9nhQkHJy Haz2geIRr3E5RfbwSjTRr5H2tYNfS0R29/bJb8eLsX1J/ceWFy15Tc4TT9N/7R5phd2i c821dW65HohbUr5ILknNvu62GLgt3fGoutsGD7uFX0w1tlk8o1l3pqIvd8zGmkejalbg K4bfXvRDUvSt9VjSNBVMONQmVvLODNSSOrMuLQ9S7S8Luzq2TMLWVNdc0+qYDLt8gb0C up8Q== X-Gm-Message-State: ALoCoQnwNBiPna3zbpuydH4jFAoXnizyVPEurMr/dh6COI3MqRrYBEctpsBHC2hme06iLKF5PXD5 X-Received: by 10.180.14.169 with SMTP id q9mr8312967wic.19.1408467447372; Tue, 19 Aug 2014 09:57:27 -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 gc8sm36225wic.3.2014.08.19.09.57.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Aug 2014 09:57:26 -0700 (PDT) From: Daniel Thompson To: Russell King Subject: [PATCH v10 12/19] serial: kgdb_nmi: No CON_ENABLED by default Date: Tue, 19 Aug 2014 17:46:02 +0100 Message-Id: <1408466769-20004-13-git-send-email-daniel.thompson@linaro.org> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1408466769-20004-1-git-send-email-daniel.thompson@linaro.org> References: <1408369264-14242-1-git-send-email-daniel.thompson@linaro.org> <1408466769-20004-1-git-send-email-daniel.thompson@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140819_095752_308369_426CC58B X-CRM114-Status: GOOD ( 13.53 ) 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=-2.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: