lkml.org 
[lkml]   [2012]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [char-misc-next 07/15] mei: use wrietl/readl instead of io wrappers
Date
> >
> > /**
> > @@ -451,7 +451,7 @@ static inline u32 mei_reg_read(const struct
> > mei_device *dev, static inline void mei_reg_write(const struct mei_device
> *dev,
> > unsigned long offset, u32 value) {
> > - iowrite32(value, dev->mem_addr + offset);
> > + writel(value, dev->mem_addr + offset);
>
> ioremap should match readl/writel
> iomap iowrite32/ioread32

Thanks, I can replace pci_iomap with pci_ioremap_bar although in low level it is doing just the same.


> so you need to tweak the map/unmap if you do this.
>
> As to overhead. I'd love to see a measurement that can detect the
> difference. Do you have a benchmark that shows it ?

Don't have any numbers but it seems reasonable to me.
I did following this example

commit 05f5b97ee0013fefbd9139cf8c3eda5f2a88c04a
Author: Stanislaw Gruszka <sgruszka@redhat.com>
Date: Wed Mar 7 09:52:26 2012 -0800

iwlwifi: use writeb,writel,readl directly

That change will save us some CPU cycles at run time. Having port-based
I/O seems to be not possible for PCIe devices.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>

Thanks
Tomas



\
 
 \ /
  Last update: 2012-12-04 17:01    [W:0.789 / U:1.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site