)]}'
{
  "commit": "c8dc497ac3ed4a3a816b5dc40457fe3e2a7c5ec9",
  "tree": "04eedddf1786d7e956e56e9e6d14159b1bf1476e",
  "parents": [
    "34f0905bbb74faf893e8f1b1f27393885b8862f2"
  ],
  "author": {
    "name": "Mark Brown",
    "email": "broonie@kernel.org",
    "time": "Thu Aug 22 23:39:40 2024 +0100"
  },
  "committer": {
    "name": "Mark Brown",
    "email": "broonie@kernel.org",
    "time": "Wed Sep 25 16:44:08 2024 +0200"
  },
  "message": "regcache: Store values more directly in maple trees\n\nCurrently the regmap usage of the maple tree is a bit non-idomatic, rather\nthan storing register values directly we allocate arrays of contiguous\nregister values and store pointers to those arrays. This is all quite\nfiddly, especially around adding values (where we may need to combine a new\nallocation with adjacent ones) or dropping values (where we may have to\nkeep parts of a contiguous block). One reason for doing this is that the\nmaple tree wants to store pointers rather than integers, and in particular\nhas some problems when we want to store 0 as a value.\n\nFor 64 bit systems we can take advantage of the fact that regmap only\nsupports 32 bit values and store values with an extra high bit set in the\nmaple tree, avoiding the special cases with 0 and allowing us to save a\nlayer of indirection. This approach was suggested by Liam Howlett.\n\nThat doesn\u0027t help 32 bit systems though since we don\u0027t have any non-value bits there. For those we\ncan keep the same code structure by switching to do a separate allocation\nfor each value. The resulting data structure is not a thing of beauty but\nthe code is much less complicated, and should be able to make better use of\nthe slab allocator in cases where contiguous blocks of registers are not\npowers of 2.\n\nLet\u0027s implement these two approaches, using CONFIG_64BIT to choose between\ndirect storage and allocating per-register storage. The end result is much\nsimpler, making more direct usage of the maple tree API and the detailed\noptimisation work that goes into it\u0027s implementation. One indication of\nthe simplifications is that even with having the two different allocation\nstrategies we still have an overall negative diffstat.\n\nSigned-off-by: Mark Brown \u003cbroonie@kernel.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "2dea9d259c493a48c23128bea9e1c11e4066ea2e",
      "old_mode": 33188,
      "old_path": "drivers/base/regmap/regcache-maple.c",
      "new_id": "e1495326369b0d4121e21a7ba04ab87e048b059f",
      "new_mode": 33188,
      "new_path": "drivers/base/regmap/regcache-maple.c"
    }
  ]
}
