On 09/26/2016 09:13 PM, Mark Brown wrote:
On Thu, Sep 22, 2016 at 05:27:42PM +0200, Marek Vasut wrote:
On 09/22/2016 04:37 PM, Maciej S. Szmigiero wrote:
There are three possible solutions:
- Go back to RB tree cache (revert patch 4) and debug the lockdep warning,
- Keep the flat cache introduced by patch 4 but debug the oops at
cache init time (while keeping defaults read from hardware), 3) Keep both patches and risk the same issues that were previously caused by hardcoded register defaults in driver. However, Marek says the device works fine for him with the patches.
I believe switching to flat cache is harmless and it should be a better mode for devices with small mmio address spaces. After some discussion on IRC, I believe [1] should resolve the RBTREE crash (?).
So, can we get a clear decision on this after testing? The discussion here and the discussion on IRC are a bit disjointed and I'd like to make sure we end up with something that definitely works.
I think 1,2,3,4 are certainly harmless. I think even 5 is harmless (at least according to my testing on MX6Q and MX6SX, which is not the greatest sample), but can be safely reverted if there are concerns.
I also believe the following two patches should be backported for stable 4.7 (they were part of tag 'regmap-fix-v4.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap):
commit b2c7f5d9c939a37c1ce7f86a642de70e3033ee9e Author: Maarten ter Huurne maarten@treewalker.org Date: Fri Jul 29 23:42:12 2016 +0200
regmap: cache: Fix num_reg_defaults computation from reg_defaults_raw
commit 1bc8da4e143c0fd8807e061a66d91d5972601ab1 Author: Lars-Peter Clausen lars@metafoo.de Date: Thu Aug 4 17:22:16 2016 +0200
regmap: rbtree: Avoid overlapping nodes