Message ID | 20201109125021.842975708@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=upl/=EP=vger.kernel.org=stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AB107C388F7 for <stable@archiver.kernel.org>; Mon, 9 Nov 2020 13:49:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6FDC2206E3 for <stable@archiver.kernel.org>; Mon, 9 Nov 2020 13:49:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604929769; bh=LR6TJwTFeV/7ptm/etcGeH6qT/PUkytplgnA/IRB8NY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ApaQvby3B6eCyqq1yj27arxepSpw5Rn6cnQK9Ik8VSNYHA4g4DgLtTe9f00PYHviP FtTPjLUqKQDAhtyUjQ2Smkvabbgn0na4VKvo20AuYV8VOqUQxhIKB1qXwMtzf+zOzk O5pmJxXUFEKtpy+ZBuGEm5SP71P5Jba4Yr+NiPMA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730189AbgKINtG (ORCPT <rfc822;stable@archiver.kernel.org>); Mon, 9 Nov 2020 08:49:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:51180 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729831AbgKIM4Z (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 9 Nov 2020 07:56:25 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 556B92083B; Mon, 9 Nov 2020 12:56:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604926584; bh=LR6TJwTFeV/7ptm/etcGeH6qT/PUkytplgnA/IRB8NY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pCS+FakHX88RHjb4T/y2rS5ebFWhGR87kX90EdZi3qjaUXaBF8Zt8A9re+iySJI5d hE4M2sxSvRFpuIgojpob3grr9UoyHcRD7YdVibwyH7GPxJIpeDY3WbhvYSo8jyq5/3 PnX/ugBPWpLVcDTmWmzK/xuyQX3g4MT7JM3261YQ= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Douglas Anderson <dianders@chromium.org>, Daniel Thompson <daniel.thompson@linaro.org>, Sasha Levin <sashal@kernel.org> Subject: [PATCH 4.4 20/86] kgdb: Make "kgdbcon" work properly with "kgdb_earlycon" Date: Mon, 9 Nov 2020 13:54:27 +0100 Message-Id: <20201109125021.842975708@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201109125020.852643676@linuxfoundation.org> References: <20201109125020.852643676@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c index 321ccdbb73649..bc791cec58e63 100644 --- a/kernel/debug/debug_core.c +++ b/kernel/debug/debug_core.c @@ -94,14 +94,6 @@ int dbg_switch_cpu; /* Use kdb or gdbserver mode */ int dbg_kdb_mode = 1; -static int __init opt_kgdb_con(char *str) -{ - kgdb_use_con = 1; - return 0; -} - -early_param("kgdbcon", opt_kgdb_con); - module_param(kgdb_use_con, int, 0644); module_param(kgdbreboot, int, 0644); @@ -811,6 +803,20 @@ static struct console kgdbcons = { .index = -1, }; +static int __init opt_kgdb_con(char *str) +{ + kgdb_use_con = 1; + + if (kgdb_io_module_registered && !kgdb_con_registered) { + register_console(&kgdbcons); + kgdb_con_registered = 1; + } + + return 0; +} + +early_param("kgdbcon", opt_kgdb_con); + #ifdef CONFIG_MAGIC_SYSRQ static void sysrq_handle_dbg(int key) {