> >
> >  /**
> > @@ -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 <sgrus...@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 <sgrus...@redhat.com>

Thanks
Tomas

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to