Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751129AbdFAM0I (ORCPT ); Thu, 1 Jun 2017 08:26:08 -0400 Received: from merlin.infradead.org ([205.233.59.134]:53522 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750952AbdFAM0G (ORCPT ); Thu, 1 Jun 2017 08:26:06 -0400 Date: Thu, 1 Jun 2017 14:25:51 +0200 From: Peter Zijlstra To: Vlastimil Babka Cc: Lu Baolu , Greg Kroah-Hartman , Ingo Molnar , Mathias Nyman , tglx@linutronix.de, linux-usb@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, Steven Rostedt , Michal Kubecek Subject: Re: [PATCH v8 2/5] usb: early: add driver for xhci debug capability Message-ID: <20170601122551.3x6p3g2jofvwi7gk@hirez.programming.kicks-ass.net> References: <1490083293-3792-1-git-send-email-baolu.lu@linux.intel.com> <1490083293-3792-3-git-send-email-baolu.lu@linux.intel.com> <592E3817.4030402@linux.intel.com> <592F8BF3.4070004@linux.intel.com> <56601eff-386e-3405-abf2-51a163201253@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56601eff-386e-3405-abf2-51a163201253@suse.cz> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 719 Lines: 13 On Thu, Jun 01, 2017 at 10:15:24AM +0200, Vlastimil Babka wrote: > Thanks. I didn't make it clear that the trace_printk() warning is there > even if the code using it doesn't actually execute (i.e. I didn't > specify any early_printk bootparam). There are some roastedy tricks to > detect the potential users, so that the buffers can be allocated in > advance to allow the first trace_printk() from any context, I guess. > > I'm not sure if there's a way to change it so that your driver reports > the trace_printk usage only in response to the bootparam (which could > also be a safe point to allocate ftrace buffers?). No, nor do we want to. There should not be a single caller to trace_printk() in normal kernels.