lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACPK8XdBSYHB+S8Sp8Y=J0cK9D=coa+coQj3S7TEFs9DJ8Ljxg@mail.gmail.com>
Date:   Wed, 16 Jan 2019 10:14:26 +1100
From:   Joel Stanley <joel@....id.au>
To:     Jae Hyun Yoo <jae.hyun.yoo@...ux.intel.com>
Cc:     Andrew Jeffery <andrew@...id.au>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Arnd Bergmann <arnd@...db.de>,
        devicetree <devicetree@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        OpenBMC Maillist <openbmc@...ts.ozlabs.org>,
        Andy Shevchenko <andriy.shevchenko@...el.com>,
        Robin Murphy <robin.murphy@....com>,
        Ryan Chen <ryan_chen@...eedtech.com>,
        Haiyue Wang <haiyue.wang@...ux.intel.com>,
        James Feist <james.feist@...ux.intel.com>,
        Vernon Mauery <vernon.mauery@...ux.intel.com>
Subject: Re: [PATCH v10 06/12] peci: Add a PECI adapter driver for Aspeed AST24xx/AST25xx

On Tue, 15 Jan 2019 at 09:49, Jae Hyun Yoo <jae.hyun.yoo@...ux.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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ