linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Cc: linux-kernel@vger.kernel.org, patches@opensource.wolfsonmicro.com
Subject: Re: [PATCH v3] regmap: debugfs: Add a registers `range' file
Date: Fri, 8 Feb 2013 11:46:55 +0000	[thread overview]
Message-ID: <20130208114654.GQ8879@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1359720339-14862-1-git-send-email-dp@opensource.wolfsonmicro.com>

[-- Attachment #1: Type: text/plain, Size: 610 bytes --]

On Fri, Feb 01, 2013 at 12:05:39PM +0000, Dimitris Papastamos wrote:

> +struct regmap_reg_range  {
> +	unsigned int start;
> +	unsigned int end;
> +	unsigned int attr;
> +};

> +	i = start_reg;
> +	while (i <= map->max_register) {
> +		reg_attr = regmap_attr_bitmap(map, i);
> +		switch (state) {

We're doing a linear scan through the entire register map here in order
to build up a list of which registers exist, doing it every time the
file is read.  This data structure looks *very* like the one we have for
the reads themselves, it seems like we should be sharing the work here
and using the same cache.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2013-02-08 11:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-01 12:05 [PATCH v3] regmap: debugfs: Add a registers `range' file Dimitris Papastamos
2013-02-08 11:46 ` Mark Brown [this message]
2013-02-08 12:50   ` Dimitris Papastamos

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=20130208114654.GQ8879@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=dp@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;
as well as URLs for NNTP newsgroup(s).