From patchwork Wed Sep 3 11:57:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Thompson X-Patchwork-Id: 36600 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f197.google.com (mail-ig0-f197.google.com [209.85.213.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2E23A202E4 for ; Wed, 3 Sep 2014 11:58:20 +0000 (UTC) Received: by mail-ig0-f197.google.com with SMTP id r2sf41775645igi.0 for ; Wed, 03 Sep 2014 04:58: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:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=XfHMLIWPrcCMpBiQV611PhzEOORM01kXnjnluO8qE5o=; b=mwysGuVc/XIFujvUxPut/bjr4w9fZU4wssl/0vb8+d7PnIJ7938dslcgl3ci7uoRFC woNFdqWW5CFIqUwQxyUWP8dzVgnQaX672WakTlUCG8zNlhlRowgN3ISJA6V6CxAzROiu kqGR7EhuU9cKwVZFGHK8cMzdpcOX27bYbMQAQcMf2l6NJLGw5fh5M0GqSmhMBNFZskoM ZarR5qCoJ7FHkzUnKzC0y3aUH2DuSo3G4yxu2EHmdbvKFWqzyPqP8jVwGgYa5ZDs1l82 V+V4nLfBImNDSxV3iJrMhloWQ5sOxB79pWwGW6RLv4hCsG9DBUreXHXencusspwhNUHM 9rsg== X-Gm-Message-State: ALoCoQk4Jyfgzavv32+O/sxplFzOwHstoJ6QmxAnI2e81BO0TjGnMfHzm+f7Zeq9/LdHnys8jEyF X-Received: by 10.50.136.194 with SMTP id qc2mr19124805igb.7.1409745499824; Wed, 03 Sep 2014 04:58:19 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.96.42 with SMTP id j39ls2935575qge.89.gmail; Wed, 03 Sep 2014 04:58:19 -0700 (PDT) X-Received: by 10.221.62.7 with SMTP id wy7mr135345vcb.66.1409745499729; Wed, 03 Sep 2014 04:58:19 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id eh8si734551vdd.99.2014.09.03.04.58.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Sep 2014 04:58:19 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.175 as permitted sender) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id lf12so8515653vcb.20 for ; Wed, 03 Sep 2014 04:58:19 -0700 (PDT) X-Received: by 10.220.69.18 with SMTP id x18mr146437vci.58.1409745499645; Wed, 03 Sep 2014 04:58:19 -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 uj3csp668661vcb; Wed, 3 Sep 2014 04:58:19 -0700 (PDT) X-Received: by 10.180.13.83 with SMTP id f19mr34195823wic.80.1409745498545; Wed, 03 Sep 2014 04:58:18 -0700 (PDT) Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by mx.google.com with ESMTPS id j6si2556699wia.48.2014.09.03.04.58.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Sep 2014 04:58:18 -0700 (PDT) Received-SPF: pass (google.com: domain of daniel.thompson@linaro.org designates 209.85.212.177 as permitted sender) client-ip=209.85.212.177; Received: by mail-wi0-f177.google.com with SMTP id cc10so9647243wib.4 for ; Wed, 03 Sep 2014 04:58:18 -0700 (PDT) X-Received: by 10.194.71.11 with SMTP id q11mr11255872wju.33.1409745497999; Wed, 03 Sep 2014 04:58:17 -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 et1sm15473931wjd.11.2014.09.03.04.58.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Sep 2014 04:58:17 -0700 (PDT) From: Daniel Thompson To: Greg Kroah-Hartman Cc: Daniel Thompson , linux-kernel@vger.kernel.org, patches@linaro.org, linaro-kernel@lists.linaro.org, Jiri Slaby , linux-serial@vger.kernel.org Subject: [PATCH 3.17-rc3] serial: kgdb_nmi: No CON_ENABLED by default Date: Wed, 3 Sep 2014 12:57:52 +0100 Message-Id: <1409745472-2830-1-git-send-email-daniel.thompson@linaro.org> X-Mailer: git-send-email 1.9.3 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.175 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 optionally registered 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 this feature. The kernel already provides us the perfectly adequate console= argument to enable/disable consoles. Let's use that instead! Signed-off-by: Daniel Thompson Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-serial@vger.kernel.org --- drivers/tty/serial/kgdb_nmi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 1.9.3 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: