public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexander Stein <alexander.stein@systec-electronic.com>
To: Mark Brown <broonie@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] regmap: regcache-rbtree: Use GFP_ATOMIC when using spinlocks
Date: Tue, 21 Jul 2015 08:14:32 +0200	[thread overview]
Message-ID: <8537578.XGSGY4If3j@ws-stein> (raw)
In-Reply-To: <20150720172627.GF11162@sirena.org.uk>

On Monday 20 July 2015 18:26:27, Mark Brown wrote:
> > AFAICS even a flat cache seems also only be usefull when providing
> > defaults, no? (Or having volatile registers).
> 
> Well, it's *better* to provide defaults since otherwise everything
> defaults to 0 but it does avoid the whole allocation during fast path
> issue since it allocates the cache on init and perhaps that's OK.

There is another reason for using REGCACHE_FLAT: Using regcache_cache_only 
(e.g. during suspend) which is not possible with REGCACHE_NONE.

> > So how to handle this properly? Bail out, if fast_io is available and
> > cache_type != (REGCACHE_NONE || REGCACHE_FLAT)?
> 
> Or perhaps just if we have to do an allocation?  I can see that someone
> might want to use an rbtree and would be careful enough to do the init,
> though I *am* a bit dubious about it.

I'm feeling uncomfortable this warning occured only when (at least) 
CONFIG_LOCKDEP is enabled. It warns right ahead but only if you begged for 
it...
Even if defaults are provided an extension to the register set (e.g. a more 
recent IP revision with more features) might not be synchronized with the 
defaults. Nobody might noticed until CONFIG_LOCKDEP is enabled and the 
register without defaults gets written.

Best regards,
Alexander
-- 
Dipl.-Inf. Alexander Stein
SYS TEC electronic GmbH
alexander.stein@systec-electronic.com

Legal and Commercial Address:
Am Windrad 2
08468 Heinsdorfergrund
Germany

Office: +49 (0) 3765 38600-0
Fax:    +49 (0) 3765 38600-4100
 
Managing Directors:
	Director Technology/CEO: Dipl.-Phys. Siegmar Schmidt;
	Director Commercial Affairs/COO: Dipl. Ing. (FH) Armin von Collrepp
Commercial Registry:
	Amtsgericht Chemnitz, HRB 28082; USt.-Id Nr. DE150534010


  reply	other threads:[~2015-07-21  6:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-16 15:48 [PATCH 1/1] regmap: regcache-rbtree: Use GFP_ATOMIC when using spinlocks Alexander Stein
2015-07-16 19:06 ` Mark Brown
2015-07-20  7:04   ` Alexander Stein
2015-07-20 17:26     ` Mark Brown
2015-07-21  6:14       ` Alexander Stein [this message]
2015-07-21 10:43         ` Mark Brown

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=8537578.XGSGY4If3j@ws-stein \
    --to=alexander.stein@systec-electronic.com \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /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