[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121204143151.1cce530a@pyramind.ukuu.org.uk>
Date: Tue, 4 Dec 2012 14:31:51 +0000
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: Tomas Winkler <tomas.winkler@...el.com>
Cc: gregkh@...uxfoundation.org, arnd@...db.de, alan@...ux.intel.com,
linux-kernel@...r.kernel.org
Subject: Re: [char-misc-next 07/15] mei: use wrietl/readl instead of io
wrappers
On Tue, 4 Dec 2012 16:04:36 +0200
Tomas Winkler <tomas.winkler@...el.com> wrote:
> on intel registers are alwasy memory mapped so drop
> the overhead of iowrite32 and ioread32
>
> Signed-off-by: Tomas Winkler <tomas.winkler@...el.com>
> ---
> drivers/misc/mei/mei_dev.h | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h
> index 92a5d9a..37eb041 100644
> --- a/drivers/misc/mei/mei_dev.h
> +++ b/drivers/misc/mei/mei_dev.h
> @@ -438,7 +438,7 @@ int mei_amthif_irq_read(struct mei_device *dev, s32 *slots);
> static inline u32 mei_reg_read(const struct mei_device *dev,
> unsigned long offset)
> {
> - return ioread32(dev->mem_addr + offset);
> + return readl(dev->mem_addr + offset);
> }
>
> /**
> @@ -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
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 ?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists