From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751262AbdATDEa (ORCPT ); Thu, 19 Jan 2017 22:04:30 -0500 Received: from mga03.intel.com ([134.134.136.65]:41532 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751038AbdATDE3 (ORCPT ); Thu, 19 Jan 2017 22:04:29 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,257,1477983600"; d="scan'208";a="32987528" Subject: Re: [PATCH v5 0/4] usb: early: add support for early printk through USB3 debug port To: Ingo Molnar References: <1479189731-2728-1-git-send-email-baolu.lu@linux.intel.com> <20170119091202.GB22865@gmail.com> Cc: Greg Kroah-Hartman , Mathias Nyman , Ingo Molnar , tglx@linutronix.de, peterz@infradead.org, linux-usb@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, Peter Zijlstra From: Lu Baolu Message-ID: <58817C51.4080408@linux.intel.com> Date: Fri, 20 Jan 2017 10:56:17 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20170119091202.GB22865@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ingo, On 01/19/2017 05:12 PM, Ingo Molnar wrote: > * Lu Baolu wrote: > >> xHCI debug capability (DbC) is an optional but standalone >> functionality provided by an xHCI host controller. With DbC >> hardware initialized, the system will present a debug device >> through the USB3 debug port (normally the first USB3 port). >> The debug device is fully compliant with the USB framework >> and provides the equivalent of a very high performance (USB3) >> full-duplex serial link between the debug host and target. >> The DbC functionality is independent of xHCI host. There >> isn't any precondition from xHCI host side for DbC to work. >> >> This patch set adds support for early printk functionality >> through a USB3 debug port by 1) initializing and enabling >> the DbC hardware during early boot; 2) registering a boot >> console to the system so that early printk messages can go >> through the USB3 debug port. It also includes some lines >> of changes in usb_debug driver so that it can be bound when >> a USB3 debug device is enumerated. >> >> This code is designed to be used only for kernel debugging >> when machine crashes very early before the console code is >> initialized. It makes the life of kernel debugging easier >> when people work with a modern machine without any legacy >> serial ports. > BTW., just a side note, some kernel developers (like PeterZ - and I do it > sometimes too) remap early_printk to printk permanently and use it as their main > printk facility - because printk() reliability has suffered over the last couple > of years. > > So it's more than just early boot debugging - it's a very simple state-less > logging facility to an external computer. Thanks for the information. I will rework this message. Best regards, Lu Baolu