Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932430AbdCUMVN (ORCPT ); Tue, 21 Mar 2017 08:21:13 -0400 Received: from terminus.zytor.com ([65.50.211.136]:46774 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932374AbdCUMVK (ORCPT ); Tue, 21 Mar 2017 08:21:10 -0400 Date: Tue, 21 Mar 2017 05:20:31 -0700 From: tip-bot for Lu Baolu Message-ID: Cc: peterz@infradead.org, hpa@zytor.com, torvalds@linux-foundation.org, baolu.lu@linux.intel.com, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, mingo@kernel.org, tglx@linutronix.de, mathias.nyman@linux.intel.com Reply-To: torvalds@linux-foundation.org, peterz@infradead.org, hpa@zytor.com, mathias.nyman@linux.intel.com, baolu.lu@linux.intel.com, linux-kernel@vger.kernel.org, mingo@kernel.org, tglx@linutronix.de, gregkh@linuxfoundation.org In-Reply-To: <1490083293-3792-4-git-send-email-baolu.lu@linux.intel.com> References: <1490083293-3792-4-git-send-email-baolu.lu@linux.intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/debug] x86/earlyprintk: Add support for earlyprintk via USB3 debug port Git-Commit-ID: 1b5aeebf3a92273b4d85aeff37a16037bc3c3abf X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3282 Lines: 90 Commit-ID: 1b5aeebf3a92273b4d85aeff37a16037bc3c3abf Gitweb: http://git.kernel.org/tip/1b5aeebf3a92273b4d85aeff37a16037bc3c3abf Author: Lu Baolu AuthorDate: Tue, 21 Mar 2017 16:01:31 +0800 Committer: Ingo Molnar CommitDate: Tue, 21 Mar 2017 12:30:16 +0100 x86/earlyprintk: Add support for earlyprintk via USB3 debug port Add support for earlyprintk by writing debug messages to the USB3 debug port. Users can use this type of early printk by specifying the kernel parameter of "earlyprintk=xdbc". This gives users a chance of providing debugging output. The hardware for USB3 debug port requires DMA memory blocks. This requires to delay setting up debugging hardware and registering boot console until the memblocks are filled. Signed-off-by: Lu Baolu Acked-by: Thomas Gleixner Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Mathias Nyman Cc: Peter Zijlstra Cc: linux-usb@vger.kernel.org Link: http://lkml.kernel.org/r/1490083293-3792-4-git-send-email-baolu.lu@linux.intel.com Signed-off-by: Ingo Molnar --- Documentation/admin-guide/kernel-parameters.txt | 1 + arch/x86/kernel/early_printk.c | 5 +++++ arch/x86/kernel/setup.c | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 2ba45ca..ea1293d 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -989,6 +989,7 @@ earlyprintk=ttySn[,baudrate] earlyprintk=dbgp[debugController#] earlyprintk=pciserial,bus:device.function[,baudrate] + earlyprintk=xdbc[xhciController#] earlyprintk is useful when the kernel crashes before the normal console is initialized. It is not enabled by diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c index 8a12199..0f08403 100644 --- a/arch/x86/kernel/early_printk.c +++ b/arch/x86/kernel/early_printk.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -381,6 +382,10 @@ static int __init setup_early_printk(char *buf) if (!strncmp(buf, "efi", 3)) early_console_register(&early_efi_console, keep); #endif +#ifdef CONFIG_EARLY_PRINTK_USB_XDBC + if (!strncmp(buf, "xdbc", 4)) + early_xdbc_parse_parameter(buf + 4); +#endif buf++; } diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index e70204e..2600b1d 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -70,6 +70,7 @@ #include #include +#include #include