Skip to contentSkip to conversation

net: ieee802154: mrf24j40: convert to use maple tree register cache

PATCH In review Bo Liu 2 participants 2 messages Feb 2, 2024 – Feb 26, 2024

Subsystems (4)
lore
Share & tools
lore

Bo Liu

author
#0 lore raw

PATCH 1/1 net: ieee802154: mrf24j40: convert to use maple tree register cache

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.

---
 drivers/net/ieee802154/mrf24j40.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ieee802154/mrf24j40.c +2 -2
index ee4cfbf2c5cc..d3f42efc5d1a 100644
@@ -388,7 +388,7 @@ static const struct regmap_config mrf24j40_short_regmap = {
 	.pad_bits = 1,
 	.write_flag_mask = MRF24J40_SHORT_WRITE,
 	.read_flag_mask = MRF24J40_SHORT_READ,
-	.cache_type = REGCACHE_RBTREE,
+	.cache_type = REGCACHE_MAPLE,
 	.max_register = MRF24J40_SHORT_NUMREGS,
 	.writeable_reg = mrf24j40_short_reg_writeable,
 	.readable_reg = mrf24j40_short_reg_readable,
@@ -495,7 +495,7 @@ static const struct regmap_config mrf24j40_long_regmap = {
 	.pad_bits = 5,
 	.write_flag_mask = MRF24J40_LONG_ACCESS,
 	.read_flag_mask = MRF24J40_LONG_ACCESS,
-	.cache_type = REGCACHE_RBTREE,
+	.cache_type = REGCACHE_MAPLE,
 	.max_register = MRF24J40_LONG_NUMREGS,
 	.writeable_reg = mrf24j40_long_reg_writeable,
 	.readable_reg = mrf24j40_long_reg_readable,
Signature · 1 line
2.31.1
maintainer
#1 lore raw

Hello,

Quoted 23 lines · Bo Liu

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.

---
  drivers/net/ieee802154/mrf24j40.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ieee802154/mrf24j40.c +1 -1
index ee4cfbf2c5cc..d3f42efc5d1a 100644
@@ -388,7 +388,7 @@ static const struct regmap_config mrf24j40_short_regmap = {
  	.pad_bits = 1,
  	.write_flag_mask = MRF24J40_SHORT_WRITE,
  	.read_flag_mask = MRF24J40_SHORT_READ,
-	.cache_type = REGCACHE_RBTREE,
+	.cache_type = REGCACHE_MAPLE,
  	.max_register = MRF24J40_SHORT_NUMREGS,
  	.writeable_reg = mrf24j40_short_reg_writeable,
  	.readable_reg = mrf24j40_short_reg_readable,

drivers/net/ieee802154/mrf24j40.c static const struct regmap_config mrf24j40_long_regmap = { · line 501

Quoted 8 lines
drivers/net/ieee802154/mrf24j40.c +1 -1
@@ -495,7 +495,7 @@ static const struct regmap_config mrf24j40_long_regmap = {
  	.pad_bits = 5,
  	.write_flag_mask = MRF24J40_LONG_ACCESS,
  	.read_flag_mask = MRF24J40_LONG_ACCESS,
-	.cache_type = REGCACHE_RBTREE,
+	.cache_type = REGCACHE_MAPLE,
  	.max_register = MRF24J40_LONG_NUMREGS,
  	.writeable_reg = mrf24j40_long_reg_writeable,
  	.readable_reg = mrf24j40_long_reg_readable,

This patch has been applied to the wpan-next tree and will be part of the next pull request to net-next. Thanks!

regards
Stefan Schmidt