[v1,0/3] regmap: Drop never (properly) worked 64-bit support

Message ID 20230622183613.58762-1-andriy.shevchenko@linux.intel.com
Headers
Series regmap: Drop never (properly) worked 64-bit support |

Message

Andy Shevchenko June 22, 2023, 6:36 p.m. UTC
  regmap API internally operates on unsigned int values for the register
offsets and data. The commit back in 2015 that introduces 64-bit
excerpts in the code made a false impression that it works. Not really.

Consider two things:
 1/ register offset
 2/ data

For the first one is very rarely we need (except probably an MMIO case)
it. Even though, it won't work due to 32-bit limitations of the base offset.
Considering, let's say, 4 bytes stride the current implementation may
cover 36-bit of address space _only_. And 37-bit for the 8 bytes stride.

For the second one it's obviously that we want _all_ bits to be covered
in the data (otherwise what's the point?) and unsigned int gives us
only 32-bits.

With all this, revert all 64-bit excerpts from regmap API to avoid
false impressions and new code that never works.

Note, there are no users with such sizes in the kernel.

Andy Shevchenko (3):
  regmap: Revert "add 64-bit mode support" and Co.
  regmap: cache: Revert "Add 64-bit mode support"
  regmap: mmio: Remove unused 64-bit support code

 drivers/base/regmap/regcache.c    |  15 ----
 drivers/base/regmap/regmap-mmio.c |  24 ------
 drivers/base/regmap/regmap.c      | 122 ------------------------------
 3 files changed, 161 deletions(-)
  

Comments

Mark Brown July 12, 2023, 11:47 a.m. UTC | #1
On Thu, 22 Jun 2023 21:36:10 +0300, Andy Shevchenko wrote:
> regmap API internally operates on unsigned int values for the register
> offsets and data. The commit back in 2015 that introduces 64-bit
> excerpts in the code made a false impression that it works. Not really.
> 
> Consider two things:
>  1/ register offset
>  2/ data
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git for-next

Thanks!

[1/3] regmap: Revert "add 64-bit mode support" and Co.
      commit: 1425bdd7ef88631d0623ce3d0b8c89d8a65815d2
[2/3] regmap: cache: Revert "Add 64-bit mode support"
      commit: 039fd2e4134b7b880ba83f40a136df440047594a
[3/3] regmap: mmio: Remove unused 64-bit support code
      commit: 875403a7b524e9523e49dd32662adbc3e48cc12a

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark