From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Tomas Winkler <tomas.winkler@intel.com>
Cc: gregkh@linuxfoundation.org, arnd@arndb.de, alan@linux.intel.com,
linux-kernel@vger.kernel.org
Subject: Re: [char-misc-next 07/15] mei: use wrietl/readl instead of io wrappers
Date: Tue, 4 Dec 2012 14:31:51 +0000 [thread overview]
Message-ID: <20121204143151.1cce530a@pyramind.ukuu.org.uk> (raw)
In-Reply-To: <1354629884-3202-7-git-send-email-tomas.winkler@intel.com>
On Tue, 4 Dec 2012 16:04:36 +0200
Tomas Winkler <tomas.winkler@intel.com> wrote:
> on intel registers are alwasy memory mapped so drop
> the overhead of iowrite32 and ioread32
>
> Signed-off-by: Tomas Winkler <tomas.winkler@intel.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 ?
next prev parent reply other threads:[~2012-12-04 14:26 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-04 14:04 [char-misc-next 01/15] mei: drop redundant length paramter from mei_write_message function Tomas Winkler
2012-12-04 14:04 ` [char-misc-next 02/15] mei: use unified format for printing mei message header Tomas Winkler
2012-12-04 14:04 ` [char-misc-next 03/15] mei: move internal host clients ids to mei_dev.h from hw.h Tomas Winkler
2012-12-04 14:04 ` [char-misc-next 04/15] mei: extarct device dependent constants into hw-mei.h Tomas Winkler
2012-12-04 14:04 ` [char-misc-next 05/15] mei: inlude local headers after the system ones Tomas Winkler
2012-12-04 14:04 ` [char-misc-next 06/15] mei: kill not used BAR0 length and base variables Tomas Winkler
2012-12-04 14:04 ` [char-misc-next 07/15] mei: use wrietl/readl instead of io wrappers Tomas Winkler
2012-12-04 14:31 ` Alan Cox [this message]
2012-12-04 15:28 ` Winkler, Tomas
2012-12-04 15:37 ` Alan Cox
2012-12-04 16:02 ` Winkler, Tomas
2012-12-04 16:06 ` Alan Cox
2012-12-04 14:04 ` [char-misc-next 08/15] mei: mei_me_client is not hw API move to mei_dev.h Tomas Winkler
2012-12-04 14:04 ` [char-misc-next 09/15] mei: move hw dependent constructs to interface.c Tomas Winkler
2012-12-04 14:04 ` [char-misc-next 10/15] mei: move host bus message handling to hbm.c Tomas Winkler
2012-12-04 14:04 ` [char-misc-next 11/15] mei: drop non existent function prototype Tomas Winkler
2012-12-04 14:04 ` [char-misc-next 12/15] mei: simplify preparing client host bus messages Tomas Winkler
2012-12-04 14:04 ` [char-misc-next 13/15] mei: use structured buffer for write buffer Tomas Winkler
2012-12-04 14:04 ` [char-misc-next 14/15] mei: add common prefix to hbm function Tomas Winkler
2012-12-04 14:04 ` [char-misc-next 15/15] mei: move hbm responses from interrupt.c to hbm.c Tomas Winkler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121204143151.1cce530a@pyramind.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=alan@linux.intel.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tomas.winkler@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox