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: 36478 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f199.google.com (mail-pd0-f199.google.com [209.85.192.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 14930203BE for ; Tue, 2 Sep 2014 13:07:21 +0000 (UTC) Received: by mail-pd0-f199.google.com with SMTP id v10sf40303271pde.10 for ; Tue, 02 Sep 2014 06:07:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=5qkXBnPb1s9gM1Iokv8ileiwyhSdJ+wcjsvI8P85kPs=; b=A1NCH264dbN9NqbNpRNvf9886SzfJbxHbuUVO8Q29Cc2sKfO63057v7HpxqZbpuzK1 u7Ppwg2hM7xLHFU50ItswJH4dsdANGJHw2fC+qgTtK7CHbZX45M1xzfM511HwfBInKbQ xPUyl/BiRcc4OD4VL55RYll7DDUdg/R3Y7XfyHmUsI1HscHFlka8yge707nfE+i8unLC cDc7ahkmQ4M14tEpB2txsPpsLSa3Ea/gsUAqlSLJPauLmvf/t+OhIFFRYEpPDb+B9k9E 1h4wtESmNT2FxrzDgewUgKHoCODGcftJxHzqGR9eE4kt1ZNjXzVs/5awYm1jjWmDRyHp y05Q== X-Gm-Message-State: ALoCoQladAA8ilxS7zR5BfhvggZYMqq57pxhk0MlePPcYzkB9m0PnJxhGbGrbA7CCkgWOlaDGVrK X-Received: by 10.68.190.130 with SMTP id gq2mr18990633pbc.3.1409663240321; Tue, 02 Sep 2014 06:07:20 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.34.206 with SMTP id l72ls2387681qgl.46.gmail; Tue, 02 Sep 2014 06:07:20 -0700 (PDT) X-Received: by 10.52.1.39 with SMTP id 7mr25398377vdj.17.1409663240213; Tue, 02 Sep 2014 06:07:20 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id wd4si2232443vdb.33.2014.09.02.06.07.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 02 Sep 2014 06:07:20 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.171 as permitted sender) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id id10so6927693vcb.16 for ; Tue, 02 Sep 2014 06:07:20 -0700 (PDT) X-Received: by 10.52.83.227 with SMTP id t3mr25417216vdy.20.1409663240134; Tue, 02 Sep 2014 06:07:20 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp524764vcb; Tue, 2 Sep 2014 06:07:19 -0700 (PDT) X-Received: by 10.180.19.10 with SMTP id a10mr27840489wie.49.1409663239456; Tue, 02 Sep 2014 06:07:19 -0700 (PDT) Received: from mail-wg0-f44.google.com (mail-wg0-f44.google.com [74.125.82.44]) by mx.google.com with ESMTPS id pn10si5949368wjb.77.2014.09.02.06.07.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 02 Sep 2014 06:07:19 -0700 (PDT) Received-SPF: pass (google.com: domain of daniel.thompson@linaro.org designates 74.125.82.44 as permitted sender) client-ip=74.125.82.44; Received: by mail-wg0-f44.google.com with SMTP id m15so6755507wgh.3 for ; Tue, 02 Sep 2014 06:07:18 -0700 (PDT) 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 Cc: Daniel Thompson , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kgdb-bugreport@lists.sourceforge.net, patches@linaro.org, linaro-kernel@lists.linaro.org, John Stultz , Anton Vorontsov , Colin Cross , kernel-team@android.com, Rob Herring , Linus Walleij , Ben Dooks , Catalin Marinas , Dave Martin , Fabio Estevam , Frederic Weisbecker , Nicolas Pitre 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-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: daniel.thompson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.171 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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: