tag | 5a2d8217cd14f7b0499c57c54dbc58d13c631c91 | |
---|---|---|
tagger | William Breathitt Gray <wbg@kernel.org> | Mon Feb 26 14:27:11 2024 -0500 |
object | c83ccdc9586b3e9882da9e27507c046751999d59 |
First set of Counter fixes for 6.8 One fix to ensure private data in struct counter_device_allochelper has minimum alignment for safe DMA operations.
commit | c83ccdc9586b3e9882da9e27507c046751999d59 | [log] [tgz] |
---|---|---|
author | Nuno Sa <nuno.sa@analog.com> | Fri Feb 09 16:50:34 2024 +0100 |
committer | William Breathitt Gray <wbg@ishicorp.com> | Fri Feb 16 18:51:00 2024 -0500 |
tree | b55ded02769aef6d1bfee67c39e24f863293ae32 | |
parent | 6613476e225e090cc9aad49be7fa504e290dd33d [diff] |
counter: fix privdata alignment Aligning to the L1 cache does not guarantee the same alignment as kmallocing an object [1]. Furthermore, in some platforms, that alignment is not sufficient for DMA safety (in case someone wants to have a DMA safe buffer in privdata) [2]. Sometime ago, we had the same fixes in IIO. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/base/devres.c#n35 [2]: https://lore.kernel.org/linux-iio/20220508175712.647246-2-jic23@kernel.org/ Fixes: c18e2760308e ("counter: Provide alternative counter registration functions") Signed-off-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20240209-counter-align-fix-v2-1-5777ea0a2722@analog.com Signed-off-by: William Breathitt Gray <william.gray@linaro.org>