* [PATCH] regmap: Don't warn about cache only mode for devices with no cache
@ 2022-06-22 17:17 Mark Brown
2022-06-27 20:33 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2022-06-22 17:17 UTC (permalink / raw)
To: linux-kernel; +Cc: Dong Aisheng, Mark Brown
For devices with no cache it can make sense to use cache only mode as a
mechanism for trapping writes to hardware which is inaccessible but since
no cache is equivalent to cache bypass we force such devices into bypass
mode. This means that our check that bypass and cache only mode aren't both
enabled simultanously is less sensible for devices without a cache so relax
it.
Signed-off-by: Mark Brown <broonie@kernel.org>
---
drivers/base/regmap/regcache.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c
index 2eaffd3224c9..ef62ec225d81 100644
--- a/drivers/base/regmap/regcache.c
+++ b/drivers/base/regmap/regcache.c
@@ -495,7 +495,8 @@ EXPORT_SYMBOL_GPL(regcache_drop_region);
void regcache_cache_only(struct regmap *map, bool enable)
{
map->lock(map->lock_arg);
- WARN_ON(map->cache_bypass && enable);
+ WARN_ON(map->cache_type != REGCACHE_NONE &&
+ map->cache_bypass && enable);
map->cache_only = enable;
trace_regmap_cache_only(map, enable);
map->unlock(map->lock_arg);
--
2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] regmap: Don't warn about cache only mode for devices with no cache
2022-06-22 17:17 [PATCH] regmap: Don't warn about cache only mode for devices with no cache Mark Brown
@ 2022-06-27 20:33 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2022-06-27 20:33 UTC (permalink / raw)
To: linux-kernel, broonie; +Cc: dongas86
On Wed, 22 Jun 2022 18:17:23 +0100, Mark Brown wrote:
> For devices with no cache it can make sense to use cache only mode as a
> mechanism for trapping writes to hardware which is inaccessible but since
> no cache is equivalent to cache bypass we force such devices into bypass
> mode. This means that our check that bypass and cache only mode aren't both
> enabled simultanously is less sensible for devices without a cache so relax
> it.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git for-next
Thanks!
[1/1] regmap: Don't warn about cache only mode for devices with no cache
commit: 3d0afe9cf1ef871a71596f990d7d2e60cc0b8669
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-27 20:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-22 17:17 [PATCH] regmap: Don't warn about cache only mode for devices with no cache Mark Brown
2022-06-27 20:33 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®