Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1188386
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/1] regmap: regcache-rbtree: Use GFP_ATOMIC when using spinlocks |
| Date | 2015-07-20 19:30 +0200 |
| Message-ID | <pOn34-7R5-13@gated-at.bofh.it> (permalink) |
| References | <pMTA6-2Br-17@gated-at.bofh.it> <pMWHE-7fR-9@gated-at.bofh.it> <pOdn4-2rK-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
On Mon, Jul 20, 2015 at 09:04:05AM +0200, Alexander Stein wrote: > On Thursday 16 July 2015 20:06:57, Mark Brown wrote: Please fix your mailer to word wrap within paragraphs for legibility. > > The expectation here is that we should either be using no or a flat > > cache here or (if we're using rbtree) providing register defaults to > > ensure that we never do allocations in the spinlock. The rbtree code is > > written on the assumption that we only have to be faster than reading > > from a serial bus so I'd be worried about it not behaving at all nicely > > in a spinlock even ignoring this issue. > 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. > 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. > > Why are you using a dynamically allocated rbtree for a device like this? > On my way home, I came to the same question. In fact this is not a > driver written by myself, but from here > http://git.freescale.com/git/cgit.cgi/ppc/sdk/linux.git/tree/drivers/video/fsl-dcu-fb.c#n1024. > I guess as this is a mmio device and things like regcache_cache_only() > are used, REGCACHE_FLAT seems appropriate. Ah, out of tree BSP code...
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/1] regmap: regcache-rbtree: Use GFP_ATOMIC when using spinlocks Alexander Stein <alexander.stein@systec-electronic.com> - 2015-07-16 17:50 +0200
Re: [PATCH 1/1] regmap: regcache-rbtree: Use GFP_ATOMIC when using spinlocks Mark Brown <broonie@kernel.org> - 2015-07-16 21:10 +0200
Re: [PATCH 1/1] regmap: regcache-rbtree: Use GFP_ATOMIC when using spinlocks Mark Brown <broonie@kernel.org> - 2015-07-20 19:30 +0200
Re: [PATCH 1/1] regmap: regcache-rbtree: Use GFP_ATOMIC when using spinlocks Alexander Stein <alexander.stein@systec-electronic.com> - 2015-07-21 08:20 +0200
csiph-web