From: Mark Brown <broonie@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: Mark Brown <broonie@kernel.org>
Subject: [PATCH] regcache: Improve documentation of available cache types
Date: Tue, 24 Sep 2024 12:08:08 +0200 [thread overview]
Message-ID: <20240924-regcache-document-types-v1-1-e157054e1215@kernel.org> (raw)
There is some user confusion about which cache types to choose when which
is not helped by the lack of any central documentation providing an
overview of what's available. Provide a short overview in the API header to
try to help reduce this.
Signed-off-by: Mark Brown <broonie@kernel.org>
---
include/linux/regmap.h | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index 122e38161acb..5b59423e786a 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -54,7 +54,14 @@ struct sdw_slave;
#define REGMAP_UPSHIFT(s) (-(s))
#define REGMAP_DOWNSHIFT(s) (s)
-/* An enum of all the supported cache types */
+/*
+ * The supported cache types, the default is no cache. Any new caches
+ * should usually use the maple tree cache unless they specifically
+ * require that there are never any allocations at runtime and can't
+ * provide defaults in which case they should use the flat cache. The
+ * rbtree cache *may* have some performance advantage for very low end
+ * systems that make heavy use of cache syncs but is mainly legacy.
+ */
enum regcache_type {
REGCACHE_NONE,
REGCACHE_RBTREE,
---
base-commit: 98f7e32f20d28ec452afb208f9cffc08448a2652
change-id: 20240923-regcache-document-types-5ab0e3448b8b
Best regards,
--
Mark Brown <broonie@kernel.org>
next reply other threads:[~2024-09-24 10:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-24 10:08 Mark Brown [this message]
2024-10-01 11:13 ` [PATCH] regcache: Improve documentation of available cache types 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=20240924-regcache-document-types-v1-1-e157054e1215@kernel.org \
--to=broonie@kernel.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