Re: [RFC 10/21] xhci: replace xhci_readl() with readl() in xhci-dbg.c

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

 



Hi ksenia,

On Fri, Sep 13, 2013 at 04:45:23PM +0800, Xenia Ragiadakou wrote:
> On 09/13/2013 06:49 AM, Pratyush Anand wrote:
> > On Tue, Sep 10, 2013 at 02:03:15AM +0800, Xenia Ragiadakou wrote:
> >> Function xhci_readl() is used to read 32bit xHC registers residing in MMIO
> >> address space. It takes as first argument a pointer to the xhci_hcd although
> >> it does not use it because internally it simply calls readl. This creates
> >> an illusion that xhci_readl() is an xhci specific function that has to be
> >> called in a context where a pointer to xhci_hcd is available.
> >> This patch replaces calls to xhci_readl() with calls to readl() in xhci-dbg.c.
> >> This is done so that xhci_readl() can be removed completely and code can
> >> become more straight-forward.
> > Its fine that this replacement would simplify it. But, I have
> > experienced that sometime such way of reading/writing a peripheral
> > registers is quite helpful. I was able to find several issues in dwc3
> > gadget isoc handling quickly because of the availability of dwc3_readl
> > dwc3_writel.
> >
> > With such peripheral specific exerciser one can log all register
> > read/write in sequential order with timestamp with a little effort,
> > which can further help in debugging critical issues. Sometime, they
> > might be even helpful in diagnosis of hardware issues. Same sequence
> > can be extracted and provided to hardware engineer for analysing the
> > behaviour of device in simulation.
> >
> > Regards
> > Pratyush
> >
> >> Signed-off-by: Xenia Ragiadakou <burzalodowa@xxxxxxxxx>
> 
> Hi Pratyush,
> 
> The truth is that I did not think of that. What tool do you use to trace 
> read/write operations for a specific peripheral? I think that you can 
> trace them using mmiotrace and then filter the output (so that the 
> address lie within the mmio address space of the particular device you 
> are interested in).
> Mmiotrace reports whether it is read/write, the address, the width in 
> bytes, the value etc, so you can apply filters to tune your search.
> In that case there is no need for a wrapper function around 
> readl()/writel(), but maybe you have another tool in mind so the wrapper 
> function will suit better, don't know.

But Mmiotrace is supported by x86 arch only. Do you know similar tool
for ARM?

Regards
Pratyush


> 
> best regards,
> ksenia
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




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

  Powered by Linux