summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorGary Guo <gary@garyguo.net>2024-09-16 02:33:46 +0200
committerMiguel Ojeda <ojeda@kernel.org>2024-09-26 17:52:35 +0200
commit732cd686cdd60f9d8c36edac2a14d8f5eea57ee1 (patch)
tree08e16c1f21ba1a8628585f63a51c16ff1d951bf6 /init
parentrust: sync: require `T: Sync` for `LockedBy::access` (diff)
downloadlinux-732cd686cdd60f9d8c36edac2a14d8f5eea57ee1.tar.xz
linux-732cd686cdd60f9d8c36edac2a14d8f5eea57ee1.zip
rust: fix `ARCH_SLAB_MINALIGN` multiple definition error
We use const helpers in form of const size_t RUST_CONST_HELPER_ARCH_SLAB_MINALIGN = ARCH_SLAB_MINALIGN; to aid generation of constants by bindgen because it is otherwise a macro definition of an expression and bindgen doesn't expand the constant. The helpers are then have `RUST_CONST_HELPER` prefix stripped and exposed to Rust code as if `ARCH_SLAB_MISALIGN` is generated natively by bindgen. This works well for most constants, but on RISC-V, `ARCH_SLAB_MINALIGN` is defined directly as literal constant if `!CONFIG_MMU`, and bindgen would generate `ARCH_SLAB_MINALIGN` directly, thus conflict with the one generated through the helper. To fix this, we simply need to block bindgen from generating directly without going through helper. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202409160804.eSg9zh1e-lkp@intel.com/ Signed-off-by: Gary Guo <gary@garyguo.net> Reviewed-by: Christian Schrefl <chrisi.schrefl@gmail.com> Link: https://lore.kernel.org/r/20240916003347.1744345-1-gary@garyguo.net Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions