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: 35637 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qg0-f72.google.com (mail-qg0-f72.google.com [209.85.192.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2889F202DD for ; Tue, 19 Aug 2014 16:57:31 +0000 (UTC) Received: by mail-qg0-f72.google.com with SMTP id j5sf8787023qga.3 for ; Tue, 19 Aug 2014 09:57:29 -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=WN/vjTI81HJMTx00tQn23Md3Y8NRw0tZq5gSZ/ygb1XRoaFHY721wEqo+Xt1QmsCGb yZwOSDs9uGRXujUCqsZ37MmKF5HvmvV6FCjJRt8j4tIeQyZuQv61GuTXqpsVKelbcLX/ ivX3Og6xFpiV+XsWsKuGsb64lT9OlpFfJeEExiEAyylLBsqK7dygtNgFjegNxIXeYwtD guTVzjPoWLPOqvUEi0ZVQn936jnUfX3UzKe1+GXcpLx6Dbc/R2RbtkM0OPj2XYga8M9I 7ZLQSB3ODsptLPyJKPmvFPCQzKBlif3jzoKLJfxQoTNajDYmTWlAyJxhltVHDaWKz4p0 4QFA== X-Gm-Message-State: ALoCoQl7WGOYJ0zT1GuejCUlJjJB4LJnJw6AofdVuGNyBXprFBeEyXAhcLtrKsaOOoBJ9UU+Wv/G X-Received: by 10.224.29.1 with SMTP id o1mr22375512qac.0.1408467449479; Tue, 19 Aug 2014 09:57:29 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.23.69 with SMTP id 63ls2853083qgo.59.gmail; Tue, 19 Aug 2014 09:57:29 -0700 (PDT) X-Received: by 10.220.190.197 with SMTP id dj5mr31318202vcb.19.1408467449362; Tue, 19 Aug 2014 09:57:29 -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 xc7si9156736vcb.32.2014.08.19.09.57.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 19 Aug 2014 09:57:29 -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 hq11so7768591vcb.16 for ; Tue, 19 Aug 2014 09:57:29 -0700 (PDT) X-Received: by 10.220.97.5 with SMTP id j5mr31497369vcn.16.1408467449250; Tue, 19 Aug 2014 09:57:29 -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.37.5 with SMTP id tc5csp255115vcb; Tue, 19 Aug 2014 09:57:28 -0700 (PDT) X-Received: by 10.180.75.203 with SMTP id e11mr8494868wiw.28.1408467447896; Tue, 19 Aug 2014 09:57:27 -0700 (PDT) Received: from mail-we0-f180.google.com (mail-we0-f180.google.com [74.125.82.180]) by mx.google.com with ESMTPS id u9si6360028wjx.44.2014.08.19.09.57.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 19 Aug 2014 09:57:27 -0700 (PDT) Received-SPF: pass (google.com: domain of daniel.thompson@linaro.org designates 74.125.82.180 as permitted sender) client-ip=74.125.82.180; Received: by mail-we0-f180.google.com with SMTP id w61so6716493wes.39 for ; Tue, 19 Aug 2014 09:57:27 -0700 (PDT) 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 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 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-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: