From: Joel Stanley <joel@jms.id.au>
To: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
Cc: Andrew Jeffery <andrew@aj.id.au>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Arnd Bergmann <arnd@arndb.de>,
devicetree <devicetree@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
OpenBMC Maillist <openbmc@lists.ozlabs.org>,
Andy Shevchenko <andriy.shevchenko@intel.com>,
Robin Murphy <robin.murphy@arm.com>,
Ryan Chen <ryan_chen@aspeedtech.com>,
Haiyue Wang <haiyue.wang@linux.intel.com>,
James Feist <james.feist@linux.intel.com>,
Vernon Mauery <vernon.mauery@linux.intel.com>
Subject: Re: [PATCH v10 06/12] peci: Add a PECI adapter driver for Aspeed AST24xx/AST25xx
Date: Wed, 16 Jan 2019 10:14:26 +1100 [thread overview]
Message-ID: <CACPK8XdBSYHB+S8Sp8Y=J0cK9D=coa+coQj3S7TEFs9DJ8Ljxg@mail.gmail.com> (raw)
In-Reply-To: <abaef001-a769-ec5d-45f0-02a994fdbee6@linux.intel.com>
On Tue, 15 Jan 2019 at 09:49, Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com> wrote:
> >> + /**
> >> + * We check that the regmap works on this very first access,
> >> + * but as this is an MMIO-backed regmap, subsequent regmap
> >> + * access is not going to fail and we skip error checks from
> >> + * this point.
> >
> > Why do you use a regmap for this driver? AFAICT it has exclusive
> > ownership over the register range it uses, which is sometimes a reason
> > to use a regmap over a mmio region.
> >
> > I'm not sure if you've ever disassembled drivers/base/regmap/regmap.o,
> > but if you do you will find that a single mmio read turns into
> > hundreds of instructions.
> >
>
> No specific reason. regmap makes some overhead as you mentioned but it
> also provides some advantages on access simplification, endianness
> handling and register dump at run time. I would not insist using of
> regmap if you prefer using of raw readl and writel. Do you want replace
> regmap with readl and writel in this driver?
I think that would be best.
You raise some good points about the regmap API, and you're not alone
in using it for these reasons. We should look in to providing a
suitable API without the overhead, or making regmap more efficient for
the mmio case.
next prev parent reply other threads:[~2019-01-15 23:14 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-07 21:41 [PATCH v10 00/12] PECI device driver introduction Jae Hyun Yoo
2019-01-07 21:41 ` [PATCH v10 01/12] dt-bindings: Add a document of PECI subsystem Jae Hyun Yoo
2019-01-14 5:34 ` Joel Stanley
2019-01-07 21:41 ` [PATCH v10 02/12] Documentation: ioctl: Add ioctl numbers for " Jae Hyun Yoo
2019-01-07 21:41 ` [PATCH v10 03/12] peci: Add support for PECI bus driver core Jae Hyun Yoo
2019-01-14 11:13 ` Joel Stanley
2019-01-14 22:38 ` Jae Hyun Yoo
2019-01-07 21:41 ` [PATCH v10 04/12] dt-bindings: Add a document of PECI adapter driver for ASPEED AST24xx/25xx SoCs Jae Hyun Yoo
2019-01-07 21:41 ` [PATCH v10 05/12] ARM: dts: aspeed: peci: Add PECI node Jae Hyun Yoo
2019-01-14 5:45 ` Joel Stanley
2019-01-14 22:12 ` Jae Hyun Yoo
2019-01-07 21:41 ` [PATCH v10 06/12] peci: Add a PECI adapter driver for Aspeed AST24xx/AST25xx Jae Hyun Yoo
2019-01-14 11:37 ` Joel Stanley
2019-01-14 22:49 ` Jae Hyun Yoo
2019-01-15 23:14 ` Joel Stanley [this message]
2019-01-15 23:36 ` Jae Hyun Yoo
2019-01-07 21:41 ` [PATCH v10 07/12] dt-bindings: mfd: Add a document for PECI client driver Jae Hyun Yoo
2019-01-14 11:39 ` Joel Stanley
2019-01-07 21:41 ` [PATCH v10 08/12] mfd: intel-peci-client: Add " Jae Hyun Yoo
2019-01-14 11:42 ` Joel Stanley
2019-01-14 23:03 ` Jae Hyun Yoo
2019-01-07 21:41 ` [PATCH v10 09/12] Documentation: hwmon: Add documents for PECI hwmon client drivers Jae Hyun Yoo
2019-01-14 11:43 ` Joel Stanley
2019-01-14 22:54 ` Jae Hyun Yoo
2019-01-07 21:41 ` [PATCH v10 10/12] hwmon: Add PECI cputemp driver Jae Hyun Yoo
2019-01-07 21:41 ` [PATCH v10 11/12] hwmon: Add PECI dimmtemp driver Jae Hyun Yoo
2019-01-07 21:41 ` [PATCH v10 12/12] Add maintainers for the PECI subsystem Jae Hyun Yoo
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='CACPK8XdBSYHB+S8Sp8Y=J0cK9D=coa+coQj3S7TEFs9DJ8Ljxg@mail.gmail.com' \
--to=joel@jms.id.au \
--cc=andrew@aj.id.au \
--cc=andriy.shevchenko@intel.com \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=haiyue.wang@linux.intel.com \
--cc=jae.hyun.yoo@linux.intel.com \
--cc=james.feist@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=openbmc@lists.ozlabs.org \
--cc=robin.murphy@arm.com \
--cc=ryan_chen@aspeedtech.com \
--cc=vernon.mauery@linux.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;
as well as URLs for NNTP newsgroup(s).