aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c
diff options
context:
space:
mode:
authorArnd Bergmann <[email protected]>2025-05-01 01:25:45 +0000
committerRodrigo Vivi <[email protected]>2025-05-01 15:48:56 +0000
commit9c088a5c0d6f019bbc482d433ddddb18db6214f1 (patch)
tree88e36f9c7c4c97253105e8c8a13cba8c6df1df00 /drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c
parentdrm/xe/vf: Fix guc_info debugfs for VFs (diff)
downloadkernel-9c088a5c0d6f019bbc482d433ddddb18db6214f1.tar.gz
kernel-9c088a5c0d6f019bbc482d433ddddb18db6214f1.zip
drm/xe: fix devcoredump chunk alignmnent calculation
The device core dumps are copied in 1.5GB chunks, which leads to a link-time error on 32-bit builds because of the 64-bit division not getting trivially turned into mask and shift operations: ERROR: modpost: "__moddi3" [drivers/gpu/drm/xe/xe.ko] undefined! On top of this, I noticed that the ALIGN_DOWN() usage here cannot work because that is only defined for power-of-two alignments. Change ALIGN_DOWN into an explicit div_u64_rem() that avoids the link error and hopefully produces the right results. Doing a 1.5GB kvmalloc() does seem a bit suspicious as well, e.g. this will clearly fail on any 32-bit platform and is also likely to run out of memory on 64-bit systems under memory pressure, so using a much smaller power-of-two chunk size might be a good idea instead. v2: - Always call div_u64_rem (Matt) Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Fixes: c4a2e5f865b7 ("drm/xe: Add devcoredump chunking") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Matthew Brost <[email protected]> Reviewed-by: Rodrigo Vivi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rodrigo Vivi <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c')
0 files changed, 0 insertions, 0 deletions