Re: [PATCH 3/3] usb: dwc3: remove base parameter of event class dwc3_log_io

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 10, 2023, Linyu Yuan wrote:
> 
> On 1/10/2023 2:47 AM, Thinh Nguyen wrote:
> > On Fri, Jan 06, 2023, Linyu Yuan wrote:
> > > when trace register read/write operation, it is not necessary to show
> > > virtual address cacaulate from base and offset.
> > > 
> > > remove the base register value, it will save trace buffer.
> > > it is enough only save and show the offset.
> > > 
> > > Signed-off-by: Linyu Yuan <quic_linyyuan@xxxxxxxxxxx>
> > > ---
> > >   drivers/usb/dwc3/io.h    |  4 ++--
> > >   drivers/usb/dwc3/trace.h | 17 +++++++----------
> > >   2 files changed, 9 insertions(+), 12 deletions(-)
> > > 
> > > diff --git a/drivers/usb/dwc3/io.h b/drivers/usb/dwc3/io.h
> > > index d24513e..fcb5726 100644
> > > --- a/drivers/usb/dwc3/io.h
> > > +++ b/drivers/usb/dwc3/io.h
> > > @@ -32,7 +32,7 @@ static inline u32 dwc3_readl(void __iomem *base, u32 offset)
> > >   	 * documentation, so we revert it back to the proper addresses, the
> > >   	 * same way they are described on SNPS documentation
> > >   	 */
> > > -	trace_dwc3_readl(base, offset, value);
> > > +	trace_dwc3_readl(offset, value);
> > >   	return value;
> > >   }
> > > @@ -61,7 +61,7 @@ static inline void dwc3_writel(void __iomem *base, u32 offset, u32 value)
> > >   	 * documentation, so we revert it back to the proper addresses, the
> > >   	 * same way they are described on SNPS documentation
> > >   	 */
> > > -	trace_dwc3_writel(base, offset, value);
> > > +	trace_dwc3_writel(offset, value);
> > >   }
> > >   #endif /* __DRIVERS_USB_DWC3_IO_H */
> > > diff --git a/drivers/usb/dwc3/trace.h b/drivers/usb/dwc3/trace.h
> > > index 1975aec..536b9a1 100644
> > > --- a/drivers/usb/dwc3/trace.h
> > > +++ b/drivers/usb/dwc3/trace.h
> > > @@ -20,32 +20,29 @@
> > >   #include "debug.h"
> > >   DECLARE_EVENT_CLASS(dwc3_log_io,
> > > -	TP_PROTO(void *base, u32 offset, u32 value),
> > > -	TP_ARGS(base, offset, value),
> > > +	TP_PROTO(u32 offset, u32 value),
> > > +	TP_ARGS(offset, value),
> > >   	TP_STRUCT__entry(
> > > -		__field(void *, base)
> > >   		__field(u32, offset)
> > >   		__field(u32, value)
> > >   	),
> > >   	TP_fast_assign(
> > > -		__entry->base = base;
> > >   		__entry->offset = offset;
> > >   		__entry->value = value;
> > >   	),
> > > -	TP_printk("addr %p offset %04x value %08x",
> > > -		__entry->base + __entry->offset,
> > Please don't remove this. Sometime we need to check the base address for
> > different register offset. Currently some offsets need this to be able
> > to differientiate between different registers (e.g. different endpoint
> > registers DEPCMP and parameters)

DEPCMP -> DEPCMD*

> 
> thanks, will drop this patch.
> 

If we fix it so that all the offset prints represent the correct offset
of all the registers, then we can drop this base address print. That
would be great.

Thanks,
Thinh




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux