lkml.org 
[lkml]   [2013]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] regmap: Cut down on the average # of nodes in the rbtree cache
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


\
 
 \ /
  Last update: 2013-03-15 13:02    [W:0.039 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site