Files
linux/rust/helpers
Mukesh Kumar Chaurasiya (IBM) be809b60cb dma-resv: Fix undefined symbol when CONFIG_DMA_SHARED_BUFFER is disabled
When building with LLVM=1 for architectures like powerpc where
CONFIG_DMA_SHARED_BUFFER is not enabled, the build fails with:

  ld.lld: error: undefined symbol: dma_resv_reset_max_fences
  >>> referenced by helpers.c
  >>>               rust/helpers/helpers.o:(rust_helper_dma_resv_unlock)

The issue occurs because:
1. CONFIG_DEBUG_MUTEXES=y is enabled
2. CONFIG_DMA_SHARED_BUFFER is not enabled
3. dma_resv_reset_max_fences() is declared in the header when
   CONFIG_DEBUG_MUTEXES is set
4. But the function is only compiled in drivers/dma-buf/dma-resv.c,
   which is only built when CONFIG_DMA_SHARED_BUFFER is enabled
5. Rust helpers call dma_resv_unlock() which calls
   dma_resv_reset_max_fences(), causing an undefined symbol

Fix this by compiling `dma-resv.c` file only when CONFIG_DMA_SHARED_BUFFER
is enabled.

Fixes: 9b836641d3 ("rust: helpers: Add bindings/wrappers for dma_resv_lock")
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Mukesh Kumar Chaurasiya (IBM) <mkchauras@gmail.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20260708082454.1254320-3-mkchauras@gmail.com
2026-07-31 16:57:48 +05:30
..
2026-01-09 19:01:41 +08:00
2026-01-26 03:48:25 +01:00
2026-03-10 11:29:00 +01:00
2026-01-09 19:01:41 +08:00
2026-03-24 23:51:23 +01:00
2026-01-26 03:49:04 +01:00
2025-12-15 14:13:03 +01:00
2025-12-15 22:26:10 +01:00
2025-12-15 22:26:10 +01:00
2026-01-26 03:49:56 +01:00
2026-01-26 03:50:21 +01:00
2026-01-26 03:49:56 +01:00
2025-12-15 22:39:11 +01:00
2026-01-20 18:52:43 +01:00
2026-01-09 19:01:42 +08:00
2026-01-07 16:12:15 +01:00