From: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: patches@opensource.wolfsonmicro.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] regmap: Cut down on the average # of nodes in the rbtree cache
Date: Fri, 15 Mar 2013 11:14:54 +0000 [thread overview]
Message-ID: <20130315111454.GA30777@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20130315013534.GF4931@opensource.wolfsonmicro.com>
On Fri, Mar 15, 2013 at 01:35:34AM +0000, Mark Brown wrote:
> On Thu, Mar 14, 2013 at 02:52:35PM +0000, Dimitris Papastamos wrote:
>
> > if (rbnode) {
> > reg_tmp = (reg - rbnode->base_reg) / map->reg_stride;
> > + /* Does this register exist? If not bail out. */
> > + if (!(rbtree_ctx->reg_present[BIT_WORD(reg)] & BIT_MASK(reg)))
> > + return -ENOENT;
> > *value = regcache_rbtree_get_register(map, rbnode, reg_tmp);
>
> This means that every caller is going to need to have a check added to
> see if the register is present which doesn't seem great, we should at
> least have a function to do the check. The check is fiddly enough.
Yea makes sense, will factor it out.
Thanks,
Dimitris
prev parent reply other threads:[~2013-03-15 11:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-14 14:52 [PATCH v2] regmap: Cut down on the average # of nodes in the rbtree cache Dimitris Papastamos
2013-03-15 1:35 ` Mark Brown
2013-03-15 11:14 ` Dimitris Papastamos [this message]
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=20130315111454.GA30777@opensource.wolfsonmicro.com \
--to=dp@opensource.wolfsonmicro.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.wolfsonmicro.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