soc: qcom: icc-bwmon: Convert to use maple tree register cache
authorwangkaiyuan <wangkaiyuan@inspur.com>
Sat, 9 Mar 2024 07:28:25 +0000 (15:28 +0800)
committerBjorn Andersson <andersson@kernel.org>
Sat, 16 Mar 2024 18:01:03 +0000 (13:01 -0500)
The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache.

Signed-off-by: wangkaiyuan <wangkaiyuan@inspur.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240309072825.45385-1-wangkaiyuan@inspur.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/soc/qcom/icc-bwmon.c

index 656706259353390b1b511ee9b12745a7bb2fd2aa..fb323b3364db4e4c6cea785b7cd9b47472f9a056 100644 (file)
@@ -282,7 +282,7 @@ static const struct regmap_config msm8998_bwmon_regmap_cfg = {
         * Cache is necessary for using regmap fields with non-readable
         * registers.
         */
-       .cache_type             = REGCACHE_RBTREE,
+       .cache_type             = REGCACHE_MAPLE,
 };
 
 static const struct regmap_config msm8998_bwmon_global_regmap_cfg = {
@@ -301,7 +301,7 @@ static const struct regmap_config msm8998_bwmon_global_regmap_cfg = {
         * Cache is necessary for using regmap fields with non-readable
         * registers.
         */
-       .cache_type             = REGCACHE_RBTREE,
+       .cache_type             = REGCACHE_MAPLE,
 };
 
 static const struct reg_field sdm845_cpu_bwmon_reg_fields[] = {
@@ -369,7 +369,7 @@ static const struct regmap_config sdm845_cpu_bwmon_regmap_cfg = {
         * Cache is necessary for using regmap fields with non-readable
         * registers.
         */
-       .cache_type             = REGCACHE_RBTREE,
+       .cache_type             = REGCACHE_MAPLE,
 };
 
 /* BWMON v5 */
@@ -446,7 +446,7 @@ static const struct regmap_config sdm845_llcc_bwmon_regmap_cfg = {
         * Cache is necessary for using regmap fields with non-readable
         * registers.
         */
-       .cache_type             = REGCACHE_RBTREE,
+       .cache_type             = REGCACHE_MAPLE,
 };
 
 static void bwmon_clear_counters(struct icc_bwmon *bwmon, bool clear_all)