From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751722AbdE3Nq3 (ORCPT ); Tue, 30 May 2017 09:46:29 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:36834 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751416AbdE3Nq1 (ORCPT ); Tue, 30 May 2017 09:46:27 -0400 Subject: Re: [PATCH v8 2/5] usb: early: add driver for xhci debug capability To: Lu Baolu , Greg Kroah-Hartman , Ingo Molnar Cc: Mathias Nyman , tglx@linutronix.de, peterz@infradead.org, linux-usb@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, Steven Rostedt References: <1490083293-3792-1-git-send-email-baolu.lu@linux.intel.com> <1490083293-3792-3-git-send-email-baolu.lu@linux.intel.com> From: Vlastimil Babka Message-ID: Date: Tue, 30 May 2017 15:46:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <1490083293-3792-3-git-send-email-baolu.lu@linux.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/21/2017 09:01 AM, Lu Baolu wrote: > XHCI debug capability (DbC) is an optional but standalone > functionality provided by an xHCI host controller. Software > learns this capability by walking through the extended > capability list of the host. XHCI specification describes > DbC in the section 7.6. > > This patch introduces the code to probe and initialize the > debug capability hardware during early boot. With hardware > initialized, the debug target (system on which this code is > running) will present a debug device through the 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 the xHCI host. There isn't any precondition > from the xHCI host side for the DbC to work. > > One use for this feature is kernel debugging, for example > when your machine crashes very early before the regular > console code is initialized. Other uses include simpler, > lockless logging instead of a full-blown printk console > driver and klogd. > > Cc: Ingo Molnar > Cc: Mathias Nyman > Signed-off-by: Lu Baolu ... > + > +#define XDBC_TRACE > +#ifdef XDBC_TRACE > +#define xdbc_trace trace_printk Did you forget to remove the #define XDBC_TRACE? Enabling this driver brings the "trace_printk() being used. Allocating extra memory. This means that this is a DEBUG kernel and it is unsafe for production use." message in 4.12-rcX dmesg. Thanks, Vlastimil