[PATCH 00/11] mfd:: Update Cirrus Logic drivers to use maple tree register caches
With the v6.5 merge window the maple tree register cache has acquired the ability to generate multi-register writes during sync operations, removing the last major limitation it had compared to the rbtree cache. As part of a general modernisation effort update the Cirrus Logic drivers to use the more modern data structure, realistically there is likely to be very little user visible impact either way but generally the implementation choices of the maple tree cache should be a bit better on modern hardware.
Signed-off-by: Mark --- Mark Brown (11): mfd: cs47l15: Update to use maple tree register cache mfd: cs47l24: Update to use maple tree register cache mfd: cs47l35: Update to use maple tree register cache mfd: cs47l85: Update to use maple tree register cache mfd: cs47l90: Update to use maple tree register cache mfd: cs47l92: Update to use maple tree register cache mfd: wm5102: Update to use maple tree register cache mfd: wm5110: Update to use maple tree register cache mfd: wm8994: Update to use maple tree register cache mfd: wm8997: Update to use maple tree register cache mfd: wm8998: Update to use maple tree register cache
drivers/mfd/cs47l15-tables.c | 8 ++++---- drivers/mfd/cs47l24-tables.c | 2 +- drivers/mfd/cs47l35-tables.c | 8 ++++---- drivers/mfd/cs47l85-tables.c | 8 ++++---- drivers/mfd/cs47l90-tables.c | 8 ++++---- drivers/mfd/cs47l92-tables.c | 8 ++++---- drivers/mfd/wm5102-tables.c | 2 +- drivers/mfd/wm5110-tables.c | 2 +- drivers/mfd/wm8994-regmap.c | 6 +++--- drivers/mfd/wm8997-tables.c | 2 +- drivers/mfd/wm8998-tables.c | 2 +- 11 files changed, 28 insertions(+), 28 deletions(-) --- base-commit: 06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5 change-id: 20230623-mfd-cirrus-maple-4b3286352baa
Best regards,
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. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there.
Update the cs47l15 driver to use the more modern data structure.
Signed-off-by: Mark Brown broonie@kernel.org --- drivers/mfd/cs47l15-tables.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/mfd/cs47l15-tables.c b/drivers/mfd/cs47l15-tables.c index 3c77f0a24e9b..59b005cc1e33 100644 --- a/drivers/mfd/cs47l15-tables.c +++ b/drivers/mfd/cs47l15-tables.c @@ -1249,7 +1249,7 @@ const struct regmap_config cs47l15_16bit_spi_regmap = { .readable_reg = &cs47l15_16bit_readable_register, .volatile_reg = &cs47l15_16bit_volatile_register,
- .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = cs47l15_reg_default, .num_reg_defaults = ARRAY_SIZE(cs47l15_reg_default), }; @@ -1264,7 +1264,7 @@ const struct regmap_config cs47l15_16bit_i2c_regmap = { .readable_reg = &cs47l15_16bit_readable_register, .volatile_reg = &cs47l15_16bit_volatile_register,
- .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = cs47l15_reg_default, .num_reg_defaults = ARRAY_SIZE(cs47l15_reg_default), }; @@ -1281,7 +1281,7 @@ const struct regmap_config cs47l15_32bit_spi_regmap = { .readable_reg = &cs47l15_32bit_readable_register, .volatile_reg = &cs47l15_32bit_volatile_register,
- .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, }; EXPORT_SYMBOL_GPL(cs47l15_32bit_spi_regmap);
@@ -1295,6 +1295,6 @@ const struct regmap_config cs47l15_32bit_i2c_regmap = { .readable_reg = &cs47l15_32bit_readable_register, .volatile_reg = &cs47l15_32bit_volatile_register,
- .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, }; EXPORT_SYMBOL_GPL(cs47l15_32bit_i2c_regmap);
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. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there.
Update the cs47l24 driver to use the more modern data structure.
Signed-off-by: Mark Brown broonie@kernel.org --- drivers/mfd/cs47l24-tables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/cs47l24-tables.c b/drivers/mfd/cs47l24-tables.c index c289d92a5c1d..878dfd298a17 100644 --- a/drivers/mfd/cs47l24-tables.c +++ b/drivers/mfd/cs47l24-tables.c @@ -1616,7 +1616,7 @@ const struct regmap_config cs47l24_spi_regmap = { .readable_reg = cs47l24_readable_register, .volatile_reg = cs47l24_volatile_register,
- .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = cs47l24_reg_default, .num_reg_defaults = ARRAY_SIZE(cs47l24_reg_default), };
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. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there.
Update the cs47l35 driver to use the more modern data structure.
Signed-off-by: Mark Brown broonie@kernel.org --- drivers/mfd/cs47l35-tables.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/mfd/cs47l35-tables.c b/drivers/mfd/cs47l35-tables.c index a0bc6c5100d6..274f4b05850a 100644 --- a/drivers/mfd/cs47l35-tables.c +++ b/drivers/mfd/cs47l35-tables.c @@ -1498,7 +1498,7 @@ const struct regmap_config cs47l35_16bit_spi_regmap = { .readable_reg = cs47l35_16bit_readable_register, .volatile_reg = cs47l35_16bit_volatile_register,
- .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = cs47l35_reg_default, .num_reg_defaults = ARRAY_SIZE(cs47l35_reg_default), }; @@ -1515,7 +1515,7 @@ const struct regmap_config cs47l35_16bit_i2c_regmap = { .readable_reg = cs47l35_16bit_readable_register, .volatile_reg = cs47l35_16bit_volatile_register,
- .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = cs47l35_reg_default, .num_reg_defaults = ARRAY_SIZE(cs47l35_reg_default), }; @@ -1534,7 +1534,7 @@ const struct regmap_config cs47l35_32bit_spi_regmap = { .readable_reg = cs47l35_32bit_readable_register, .volatile_reg = cs47l35_32bit_volatile_register,
- .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, }; EXPORT_SYMBOL_GPL(cs47l35_32bit_spi_regmap);
@@ -1550,6 +1550,6 @@ const struct regmap_config cs47l35_32bit_i2c_regmap = { .readable_reg = cs47l35_32bit_readable_register, .volatile_reg = cs47l35_32bit_volatile_register,
- .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, }; EXPORT_SYMBOL_GPL(cs47l35_32bit_i2c_regmap);
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. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there.
Update the cs47l85 driver to use the more modern data structure.
Signed-off-by: Mark Brown broonie@kernel.org --- drivers/mfd/cs47l85-tables.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/mfd/cs47l85-tables.c b/drivers/mfd/cs47l85-tables.c index 270d8eda3f5f..f397894827ce 100644 --- a/drivers/mfd/cs47l85-tables.c +++ b/drivers/mfd/cs47l85-tables.c @@ -2836,7 +2836,7 @@ const struct regmap_config cs47l85_16bit_spi_regmap = { .readable_reg = cs47l85_16bit_readable_register, .volatile_reg = cs47l85_16bit_volatile_register,
- .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = cs47l85_reg_default, .num_reg_defaults = ARRAY_SIZE(cs47l85_reg_default), }; @@ -2853,7 +2853,7 @@ const struct regmap_config cs47l85_16bit_i2c_regmap = { .readable_reg = cs47l85_16bit_readable_register, .volatile_reg = cs47l85_16bit_volatile_register,
- .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = cs47l85_reg_default, .num_reg_defaults = ARRAY_SIZE(cs47l85_reg_default), }; @@ -2872,7 +2872,7 @@ const struct regmap_config cs47l85_32bit_spi_regmap = { .readable_reg = cs47l85_32bit_readable_register, .volatile_reg = cs47l85_32bit_volatile_register,
- .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, }; EXPORT_SYMBOL_GPL(cs47l85_32bit_spi_regmap);
@@ -2888,6 +2888,6 @@ const struct regmap_config cs47l85_32bit_i2c_regmap = { .readable_reg = cs47l85_32bit_readable_register, .volatile_reg = cs47l85_32bit_volatile_register,
- .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, }; EXPORT_SYMBOL_GPL(cs47l85_32bit_i2c_regmap);
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. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there.
Update the cs47l90 driver to use the more modern data structure.
Signed-off-by: Mark Brown broonie@kernel.org --- drivers/mfd/cs47l90-tables.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/mfd/cs47l90-tables.c b/drivers/mfd/cs47l90-tables.c index 7345fc09c0bb..6f9ceb36c533 100644 --- a/drivers/mfd/cs47l90-tables.c +++ b/drivers/mfd/cs47l90-tables.c @@ -2539,7 +2539,7 @@ const struct regmap_config cs47l90_16bit_spi_regmap = { .readable_reg = cs47l90_16bit_readable_register, .volatile_reg = cs47l90_16bit_volatile_register,
- .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = cs47l90_reg_default, .num_reg_defaults = ARRAY_SIZE(cs47l90_reg_default), }; @@ -2556,7 +2556,7 @@ const struct regmap_config cs47l90_16bit_i2c_regmap = { .readable_reg = cs47l90_16bit_readable_register, .volatile_reg = cs47l90_16bit_volatile_register,
- .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = cs47l90_reg_default, .num_reg_defaults = ARRAY_SIZE(cs47l90_reg_default), }; @@ -2575,7 +2575,7 @@ const struct regmap_config cs47l90_32bit_spi_regmap = { .readable_reg = cs47l90_32bit_readable_register, .volatile_reg = cs47l90_32bit_volatile_register,
- .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, }; EXPORT_SYMBOL_GPL(cs47l90_32bit_spi_regmap);
@@ -2591,6 +2591,6 @@ const struct regmap_config cs47l90_32bit_i2c_regmap = { .readable_reg = cs47l90_32bit_readable_register, .volatile_reg = cs47l90_32bit_volatile_register,
- .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, }; EXPORT_SYMBOL_GPL(cs47l90_32bit_i2c_regmap);
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. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there.
Update the cs47l92 driver to use the more modern data structure.
Signed-off-by: Mark Brown broonie@kernel.org --- drivers/mfd/cs47l92-tables.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/mfd/cs47l92-tables.c b/drivers/mfd/cs47l92-tables.c index f296e355df4d..4d9ba865aaf6 100644 --- a/drivers/mfd/cs47l92-tables.c +++ b/drivers/mfd/cs47l92-tables.c @@ -1890,7 +1890,7 @@ const struct regmap_config cs47l92_16bit_spi_regmap = { .readable_reg = &cs47l92_16bit_readable_register, .volatile_reg = &cs47l92_16bit_volatile_register,
- .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = cs47l92_reg_default, .num_reg_defaults = ARRAY_SIZE(cs47l92_reg_default), }; @@ -1907,7 +1907,7 @@ const struct regmap_config cs47l92_16bit_i2c_regmap = { .readable_reg = &cs47l92_16bit_readable_register, .volatile_reg = &cs47l92_16bit_volatile_register,
- .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = cs47l92_reg_default, .num_reg_defaults = ARRAY_SIZE(cs47l92_reg_default), }; @@ -1926,7 +1926,7 @@ const struct regmap_config cs47l92_32bit_spi_regmap = { .readable_reg = &cs47l92_32bit_readable_register, .volatile_reg = &cs47l92_32bit_volatile_register,
- .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, }; EXPORT_SYMBOL_GPL(cs47l92_32bit_spi_regmap);
@@ -1942,6 +1942,6 @@ const struct regmap_config cs47l92_32bit_i2c_regmap = { .readable_reg = &cs47l92_32bit_readable_register, .volatile_reg = &cs47l92_32bit_volatile_register,
- .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, }; EXPORT_SYMBOL_GPL(cs47l92_32bit_i2c_regmap);
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. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there.
Update the wm5102 driver to use the more modern data structure.
Signed-off-by: Mark Brown broonie@kernel.org --- drivers/mfd/wm5102-tables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/wm5102-tables.c b/drivers/mfd/wm5102-tables.c index 6bba39657991..f77ecc635b6f 100644 --- a/drivers/mfd/wm5102-tables.c +++ b/drivers/mfd/wm5102-tables.c @@ -1938,7 +1938,7 @@ const struct regmap_config wm5102_i2c_regmap = { .readable_reg = wm5102_readable_register, .volatile_reg = wm5102_volatile_register,
- .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = wm5102_reg_default, .num_reg_defaults = ARRAY_SIZE(wm5102_reg_default), };
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. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there.
Update the wm5110 driver to use the more modern data structure.
Signed-off-by: Mark Brown broonie@kernel.org --- drivers/mfd/wm5110-tables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/wm5110-tables.c b/drivers/mfd/wm5110-tables.c index 65b9b1d6daec..eba324875afd 100644 --- a/drivers/mfd/wm5110-tables.c +++ b/drivers/mfd/wm5110-tables.c @@ -3218,7 +3218,7 @@ const struct regmap_config wm5110_i2c_regmap = { .readable_reg = wm5110_readable_register, .volatile_reg = wm5110_volatile_register,
- .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = wm5110_reg_default, .num_reg_defaults = ARRAY_SIZE(wm5110_reg_default), };
On Thu, Jul 13, 2023 at 01:49:26AM +0100, Mark Brown wrote:
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. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there.
Update the wm5110 driver to use the more modern data structure.
Signed-off-by: Mark Brown broonie@kernel.org
drivers/mfd/wm5110-tables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/wm5110-tables.c b/drivers/mfd/wm5110-tables.c index 65b9b1d6daec..eba324875afd 100644 --- a/drivers/mfd/wm5110-tables.c +++ b/drivers/mfd/wm5110-tables.c @@ -3218,7 +3218,7 @@ const struct regmap_config wm5110_i2c_regmap = { .readable_reg = wm5110_readable_register, .volatile_reg = wm5110_volatile_register,
- .cache_type = REGCACHE_RBTREE,
- .cache_type = REGCACHE_MAPLE, .reg_defaults = wm5110_reg_default, .num_reg_defaults = ARRAY_SIZE(wm5110_reg_default),
};
-- 2.39.2
This one appears to cause me some issues, seems to get the IRQs into a weird state when doing compressed stream stuff. The issue seems to also require commit bfa0b38c1483 ("regmap: maple: Implement block sync for the maple tree cache") to be present. So it definitely seems to relate to the cache sync, but not sure if it is something todo with the device itself, or the maple tree stuff yet.
Thanks, Charles
On Tue, Jul 18, 2023 at 03:42:00PM +0000, Charles Keepax wrote:
On Thu, Jul 13, 2023 at 01:49:26AM +0100, Mark Brown wrote:
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. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there.
Update the wm5110 driver to use the more modern data structure.
Signed-off-by: Mark Brown broonie@kernel.org
drivers/mfd/wm5110-tables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/wm5110-tables.c b/drivers/mfd/wm5110-tables.c index 65b9b1d6daec..eba324875afd 100644 --- a/drivers/mfd/wm5110-tables.c +++ b/drivers/mfd/wm5110-tables.c @@ -3218,7 +3218,7 @@ const struct regmap_config wm5110_i2c_regmap = { .readable_reg = wm5110_readable_register, .volatile_reg = wm5110_volatile_register,
- .cache_type = REGCACHE_RBTREE,
- .cache_type = REGCACHE_MAPLE, .reg_defaults = wm5110_reg_default, .num_reg_defaults = ARRAY_SIZE(wm5110_reg_default),
};
-- 2.39.2
This one appears to cause me some issues, seems to get the IRQs into a weird state when doing compressed stream stuff. The issue seems to also require commit bfa0b38c1483 ("regmap: maple: Implement block sync for the maple tree cache") to be present. So it definitely seems to relate to the cache sync, but not sure if it is something todo with the device itself, or the maple tree stuff yet.
Ah... I think I see the regcache_sync sets async=true, but then the maple tree code immediately deletes the buffer after calling _regmap_raw_write. So its a racy use after free.
How would we feel about having the maple tree code, clear async again?
Thanks, Charles
On Tue, Jul 18, 2023 at 05:00:35PM +0000, Charles Keepax wrote:
On Tue, Jul 18, 2023 at 03:42:00PM +0000, Charles Keepax wrote:
This one appears to cause me some issues, seems to get the IRQs into a weird state when doing compressed stream stuff. The issue seems to also require commit bfa0b38c1483 ("regmap: maple: Implement block sync for the maple tree cache") to be present. So it definitely seems to relate to the cache sync, but not sure if it is something todo with the device itself, or the maple tree stuff yet.
Ah... I think I see the regcache_sync sets async=true, but then the maple tree code immediately deletes the buffer after calling _regmap_raw_write. So its a racy use after free.
How would we feel about having the maple tree code, clear async again?
I was going to say, it must be a maple tree issue. I think we should push that async down into the rbtree code, that's probably also broken for other cache types if used in conjunction with slow buses...
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. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there.
Update the wm8994 driver to use the more modern data structure.
Signed-off-by: Mark Brown broonie@kernel.org --- drivers/mfd/wm8994-regmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/mfd/wm8994-regmap.c b/drivers/mfd/wm8994-regmap.c index cd4fef7df336..ee2ed6773afd 100644 --- a/drivers/mfd/wm8994-regmap.c +++ b/drivers/mfd/wm8994-regmap.c @@ -1238,7 +1238,7 @@ struct regmap_config wm1811_regmap_config = { .reg_bits = 16, .val_bits = 16,
- .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE,
.reg_defaults = wm1811_defaults, .num_reg_defaults = ARRAY_SIZE(wm1811_defaults), @@ -1253,7 +1253,7 @@ struct regmap_config wm8994_regmap_config = { .reg_bits = 16, .val_bits = 16,
- .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE,
.reg_defaults = wm8994_defaults, .num_reg_defaults = ARRAY_SIZE(wm8994_defaults), @@ -1268,7 +1268,7 @@ struct regmap_config wm8958_regmap_config = { .reg_bits = 16, .val_bits = 16,
- .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE,
.reg_defaults = wm8958_defaults, .num_reg_defaults = ARRAY_SIZE(wm8958_defaults),
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. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there.
Update the wm8997 driver to use the more modern data structure.
Signed-off-by: Mark Brown broonie@kernel.org --- drivers/mfd/wm8997-tables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/wm8997-tables.c b/drivers/mfd/wm8997-tables.c index 3476787c485e..288c57b2d21e 100644 --- a/drivers/mfd/wm8997-tables.c +++ b/drivers/mfd/wm8997-tables.c @@ -1523,7 +1523,7 @@ const struct regmap_config wm8997_i2c_regmap = { .readable_reg = wm8997_readable_register, .volatile_reg = wm8997_volatile_register,
- .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = wm8997_reg_default, .num_reg_defaults = ARRAY_SIZE(wm8997_reg_default), };
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. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there.
Update the wm8998 driver to use the more modern data structure.
Signed-off-by: Mark Brown broonie@kernel.org --- drivers/mfd/wm8998-tables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/wm8998-tables.c b/drivers/mfd/wm8998-tables.c index 9b34a6d76094..b3e6e85bee89 100644 --- a/drivers/mfd/wm8998-tables.c +++ b/drivers/mfd/wm8998-tables.c @@ -1556,7 +1556,7 @@ const struct regmap_config wm8998_i2c_regmap = { .readable_reg = wm8998_readable_register, .volatile_reg = wm8998_volatile_register,
- .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = wm8998_reg_default, .num_reg_defaults = ARRAY_SIZE(wm8998_reg_default), };
On Thu, 13 Jul 2023 01:49:18 +0100, Mark Brown wrote:
With the v6.5 merge window the maple tree register cache has acquired the ability to generate multi-register writes during sync operations, removing the last major limitation it had compared to the rbtree cache. As part of a general modernisation effort update the Cirrus Logic drivers to use the more modern data structure, realistically there is likely to be very little user visible impact either way but generally the implementation choices of the maple tree cache should be a bit better on modern hardware.
[...]
Applied, thanks!
[01/11] mfd: cs47l15: Update to use maple tree register cache commit: b4dcbfa82d1264f7c813b6fa4cdc63851daa9b86 [02/11] mfd: cs47l24: Update to use maple tree register cache commit: 7814d7e4eac9ad7f87dd1a670feadd9caafd3713 [03/11] mfd: cs47l35: Update to use maple tree register cache commit: 1ae7edc5cb666d6d382263d50d9a48cb8a6898e9 [04/11] mfd: cs47l85: Update to use maple tree register cache commit: e7c8dce6e5dc3f9963bc9762278f8db33770db95 [05/11] mfd: cs47l90: Update to use maple tree register cache commit: 703458beace3c8530808371398dd147339f31c71 [06/11] mfd: cs47l92: Update to use maple tree register cache commit: 5b6b74f62046d44269d3720fdfe5cc482392b99e [07/11] mfd: wm5102: Update to use maple tree register cache commit: d635f7d7f1be3160291d22cb05148259c9fdfafd [08/11] mfd: wm5110: Update to use maple tree register cache commit: aad8ec37d158a35c2397a76964f9541fe3fd59b6 [09/11] mfd: wm8994: Update to use maple tree register cache commit: 03665778ce02e9bf95ef18f2548cb6dfca01a347 [10/11] mfd: wm8997: Update to use maple tree register cache commit: 8e3c1052f4fb404f7264059e706807de43f68a23 [11/11] mfd: wm8998: Update to use maple tree register cache commit: 0d606d3545727c1399bd61b1340dde84e900178f
Best regards,
participants (3)
-
Charles Keepax
-
Lee Jones
-
Mark Brown