✗ CI.checkpatch: warning for drm/xe: fix devcoredump chunk alignmnent calculation
Patchwork
patchwork at emeril.freedesktop.org
Tue Apr 29 08:13:25 UTC 2025
== Series Details ==
Series: drm/xe: fix devcoredump chunk alignmnent calculation
URL : https://patchwork.freedesktop.org/series/148393/
State : warning
== Summary ==
+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt
Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master
202708c00696422fd217223bb679a353a5936e23
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit d43f8e6b0e02bc337a35a298a9e2549c218c76ab
Author: Arnd Bergmann <arnd at arndb.de>
Date: Tue Apr 29 09:34:00 2025 +0200
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.
Fixes: c4a2e5f865b7 ("drm/xe: Add devcoredump chunking")
Signed-off-by: Arnd Bergmann <arnd at arndb.de>
+ /mt/dim checkpatch 2653f1a7089beef2da70293be1226983a979e918 drm-intel
d43f8e6b0e02 drm/xe: fix devcoredump chunk alignmnent calculation
-:45: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#45: FILE: drivers/gpu/drm/xe/xe_devcoredump.c:208:
+ ss->read.chunk_position = div_u64_rem(offset,
+ XE_DEVCOREDUMP_CHUNK_MAX, &chunk_offset)
total: 0 errors, 0 warnings, 1 checks, 27 lines checked
More information about the Intel-xe
mailing list