[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260105211608.eoiet7ccyg5oztbc@synopsys.com>
Date: Mon, 5 Jan 2026 21:16:12 +0000
From: Thinh Nguyen <Thinh.Nguyen@...opsys.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC: Thinh Nguyen <Thinh.Nguyen@...opsys.com>,
Prashanth K <prashanth.k@....qualcomm.com>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 0/3] Add the DWC3 instance name in traces
On Mon, Jan 05, 2026, Greg Kroah-Hartman wrote:
> On Mon, Jan 05, 2026 at 05:01:00PM +0000, Thinh Nguyen wrote:
> > On Mon, Jan 05, 2026, Greg Kroah-Hartman wrote:
> > > On Mon, Jan 05, 2026 at 04:11:50PM +0000, Thinh Nguyen wrote:
> > > > Hi Greg,
> > > >
> > > > On Mon, Jan 05, 2026, Greg Kroah-Hartman wrote:
> > > > > On Mon, Jan 05, 2026 at 05:23:22PM +0530, Prashanth K wrote:
> > > > > > When multiple DWC3 controllers are being used, trace events from
> > > > > > different instances get mixed up making debugging difficult as
> > > > > > there's no way to distinguish which instance generated the trace.
> > > > > >
> > > > > > Hence append the controller base address into ftrace. This needs
> > > > > > the following reworks which is addressed using this patch series.
> > > > > >
> > > > > > 1. Removal of dep->regs and use dwc->regs everywhere
> > > > > > 2. Use dwc pointer in all dwc3_readl/writel()
> > > > > > 3. Adding the base addr in traces.
> > > > > >
> > > > > > Changes in v2:
> > > > > > - Avoid using macros for dwc3_readl/writel()
> > > > > > - Use base address intraces instead of dev name.
> > > > >
> > > > > Wait, why change this? The dev name is what you should care about.
> > > > > "base address" doesn't make much sense as this is on a lot of different
> > > > > busses, right?
> > > > >
> > > >
> > > > I asked Prashanth to do so. The reason is because the device name is not
> > > > consistent and not obvious for different busses. For example, for PCI
> > > > devices, the device name may be in a form of "dwc3.N.auto". If we only
> > > > have access to the traces and not the testing setup (which often is the
> > > > case), it's difficult to tell which is which. Also, very often the
> > > > consumer of the traces is also the hardware validation engineer, and
> > > > IMO, it's more understandable reading base address than device name.
> > >
> > > But all you need to know is "this is different than the other one", you
> > > don't "need" the io address, right? And if you really did, just add
> > > that to the trace as well _when_ you actually need it.
> >
> > The base address preserves that context to know which instance is which.
> > If we have the base address, do we still need the device name?
>
> If you have only the "base address", how do you know which device is which?
>
By association with the design layout, pci configuration space, device
tree, etc.
The inclusion of base address is helpful when matching along with other
traces such as internal signals or reading pcie traffic traces. They
capture IO access which includes the base address.
Of course, we can also request whoever provides the tracepoints to note
the device name and base address associates with it, then parse of the
tracepoints afterward... an extra step I can potenially skip if the
tracepoints are simple enough.
BR,
Thinh
Powered by blists - more mailing lists