Messages in this thread | | | From | "Winkler, Tomas" <> | Subject | RE: [char-misc-next 07/15] mei: use wrietl/readl instead of io wrappers | Date | Tue, 4 Dec 2012 15:28:23 +0000 |
| |
> > > > /** > > @@ -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
| |