Re: [PATCH v8 2/5] usb: early: add driver for xhci debug capability
From: Peter Zijlstra
Date: Thu Jun 01 2017 - 08:26:22 EST
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.