# git rev-parse -q --verify fca7526b7d8910c6125cb1ebc3e78ccd5f50ec52^{commit} fca7526b7d8910c6125cb1ebc3e78ccd5f50ec52 already have revision, skipping fetch # git checkout -q -f -B kisskb fca7526b7d8910c6125cb1ebc3e78ccd5f50ec52 # git clean -qxdf # < git log -1 # commit fca7526b7d8910c6125cb1ebc3e78ccd5f50ec52 # Author: Linus Torvalds # Date: Tue Feb 20 12:16:47 2024 -0800 # # drm/tests/drm_buddy: fix build failure on 32-bit targets # # Guenter Roeck reports that commit a64056bb5a32 ("drm/tests/drm_buddy: # add alloc_contiguous test") causes build failures on 32-bit targets: # # "This patch breaks the build on all 32-bit systems since it introduces # an unhandled direct 64-bit divide operation. # # ERROR: modpost: "__umoddi3" [drivers/gpu/drm/tests/drm_buddy_test.ko] undefined! # ERROR: modpost: "__moddi3" [drivers/gpu/drm/tests/drm_buddy_test.ko] undefined!" # # and the uses of 'u64' are all entirely pointless. Yes, the arguments to # drm_buddy_init() and drm_buddy_alloc_blocks() are in fact of type 'u64', # but none of the values here are remotely relevant, and the compiler will # happily just do the type expansion. # # Of course, in a perfect world the compiler would also have just noticed # that all the values in question are tiny, and range analysis would have # shown that doing a 64-bit divide is pointless, but that is admittedly # expecting a fair amount of the compiler. # # IOW, we shouldn't write code that the compiler then has to notice is # unnecessarily complicated just to avoid extra work. We do have fairly # high expectations of compilers, but kernel code should be reasonable to # begin with. # # It turns out that there are also other issues with this code: the KUnit # assertion messages have incorrect types in the format strings, but # that's a widely spread issue caused by the KUnit infrastructure not # having enabled format string verification. We'll get that sorted out # separately. # # Reported-by: Guenter Roeck # Fixes: a64056bb5a32 ("drm/tests/drm_buddy: add alloc_contiguous test") # Link: https://lore.kernel.org/all/538327ff-8d34-41d5-a9ae-1a334744f5ae@roeck-us.net/ # Cc: Matthew Auld # Cc: Arunpravin Paneer Selvam # Cc: Christian König # Signed-off-by: Linus Torvalds # < /opt/cross/kisskb/korg/gcc-5.5.0-nolibc/sparc64-linux/bin/sparc64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-5.5.0-nolibc/sparc64-linux/bin/sparc64-linux-ld --version # < git log --format=%s --max-count=1 fca7526b7d8910c6125cb1ebc3e78ccd5f50ec52 # make -s -j 24 ARCH=sparc64 O=/kisskb/build/linus_allnoconfig_sparc64-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/sparc64-linux/bin/sparc64-linux- allnoconfig # < make -s -j 24 ARCH=sparc64 O=/kisskb/build/linus_allnoconfig_sparc64-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/sparc64-linux/bin/sparc64-linux- help # make -s -j 24 ARCH=sparc64 O=/kisskb/build/linus_allnoconfig_sparc64-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/sparc64-linux/bin/sparc64-linux- olddefconfig # make -s -j 24 ARCH=sparc64 O=/kisskb/build/linus_allnoconfig_sparc64-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/sparc64-linux/bin/sparc64-linux- :1519:2: warning: #warning syscall clone3 not implemented [-Wcpp] cc1: warning: unrecognized command line option '-Wno-shift-negative-value' cc1: warning: unrecognized command line option '-Wno-stringop-overflow' /kisskb/src/arch/sparc/vdso/vma.c:246:12: warning: no previous prototype for 'init_vdso_image' [-Wmissing-prototypes] int __init init_vdso_image(const struct vdso_image *image, ^ /kisskb/src/arch/sparc/kernel/traps_64.c:253:6: warning: no previous prototype for 'is_no_fault_exception' [-Wmissing-prototypes] bool is_no_fault_exception(struct pt_regs *regs) ^ /kisskb/src/arch/sparc/kernel/traps_64.c:2035:6: warning: no previous prototype for 'do_mcd_err' [-Wmissing-prototypes] void do_mcd_err(struct pt_regs *regs, struct sun4v_error_entry ent) ^ /kisskb/src/arch/sparc/kernel/traps_64.c:2153:6: warning: no previous prototype for 'sun4v_nonresum_error_user_handled' [-Wmissing-prototypes] bool sun4v_nonresum_error_user_handled(struct pt_regs *regs, ^ cc1: warning: unrecognized command line option '-Wno-shift-negative-value' cc1: warning: unrecognized command line option '-Wno-stringop-overflow' /kisskb/src/arch/sparc/vdso/vclock_gettime.c:254:1: warning: no previous prototype for '__vdso_clock_gettime' [-Wmissing-prototypes] __vdso_clock_gettime(clockid_t clock, struct __kernel_old_timespec *ts) ^ /kisskb/src/arch/sparc/vdso/vclock_gettime.c:282:1: warning: no previous prototype for '__vdso_clock_gettime_stick' [-Wmissing-prototypes] __vdso_clock_gettime_stick(clockid_t clock, struct __kernel_old_timespec *ts) ^ /kisskb/src/arch/sparc/vdso/vclock_gettime.c:307:1: warning: no previous prototype for '__vdso_gettimeofday' [-Wmissing-prototypes] __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz) ^ /kisskb/src/arch/sparc/vdso/vclock_gettime.c:343:1: warning: no previous prototype for '__vdso_gettimeofday_stick' [-Wmissing-prototypes] __vdso_gettimeofday_stick(struct __kernel_old_timeval *tv, struct timezone *tz) ^ cc1: warning: unrecognized command line option '-Wno-shift-negative-value' cc1: warning: unrecognized command line option '-Wno-stringop-overflow' cc1: warning: unrecognized command line option '-Wno-shift-negative-value' cc1: warning: unrecognized command line option '-Wno-stringop-overflow' /kisskb/src/arch/sparc/prom/misc_64.c:165:5: warning: no previous prototype for 'prom_get_mmu_ihandle' [-Wmissing-prototypes] int prom_get_mmu_ihandle(void) ^ In file included from /kisskb/src/arch/sparc/vdso/vdso32/vclock_gettime.c:22:0: /kisskb/src/arch/sparc/vdso/vdso32/../vclock_gettime.c:254:1: warning: no previous prototype for '__vdso_clock_gettime' [-Wmissing-prototypes] __vdso_clock_gettime(clockid_t clock, struct __kernel_old_timespec *ts) ^ /kisskb/src/arch/sparc/vdso/vdso32/../vclock_gettime.c:282:1: warning: no previous prototype for '__vdso_clock_gettime_stick' [-Wmissing-prototypes] __vdso_clock_gettime_stick(clockid_t clock, struct __kernel_old_timespec *ts) ^ /kisskb/src/arch/sparc/vdso/vdso32/../vclock_gettime.c:307:1: warning: no previous prototype for '__vdso_gettimeofday' [-Wmissing-prototypes] __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz) ^ /kisskb/src/arch/sparc/vdso/vdso32/../vclock_gettime.c:343:1: warning: no previous prototype for '__vdso_gettimeofday_stick' [-Wmissing-prototypes] __vdso_gettimeofday_stick(struct __kernel_old_timeval *tv, struct timezone *tz) ^ cc1: warning: unrecognized command line option '-Wno-shift-negative-value' cc1: warning: unrecognized command line option '-Wno-stringop-overflow' cc1: warning: unrecognized command line option '-Wno-shift-negative-value' cc1: warning: unrecognized command line option '-Wno-stringop-overflow' /kisskb/src/arch/sparc/prom/p1275.c:52:6: warning: no previous prototype for 'prom_cif_init' [-Wmissing-prototypes] void prom_cif_init(void *cif_handler, void *cif_stack) ^ cc1: warning: unrecognized command line option '-Wno-shift-negative-value' cc1: warning: unrecognized command line option '-Wno-stringop-overflow' /kisskb/src/arch/sparc/kernel/setup_64.c:602:13: warning: no previous prototype for 'alloc_irqstack_bootmem' [-Wmissing-prototypes] void __init alloc_irqstack_bootmem(void) ^ cc1: warning: unrecognized command line option '-Wno-shift-negative-value' cc1: warning: unrecognized command line option '-Wno-stringop-overflow' /kisskb/src/arch/sparc/kernel/time_64.c:880:20: warning: no previous prototype for 'sched_clock' [-Wmissing-prototypes] unsigned long long sched_clock(void) ^ cc1: warning: unrecognized command line option '-Wno-shift-negative-value' cc1: warning: unrecognized command line option '-Wno-stringop-overflow' /kisskb/src/arch/sparc/kernel/adi_64.c:124:21: warning: no previous prototype for 'find_tag_store' [-Wmissing-prototypes] tag_storage_desc_t *find_tag_store(struct mm_struct *mm, ^ /kisskb/src/arch/sparc/kernel/adi_64.c:156:21: warning: no previous prototype for 'alloc_tag_store' [-Wmissing-prototypes] tag_storage_desc_t *alloc_tag_store(struct mm_struct *mm, ^ /kisskb/src/arch/sparc/kernel/adi_64.c:299:6: warning: no previous prototype for 'del_tag_store' [-Wmissing-prototypes] void del_tag_store(tag_storage_desc_t *tag_desc, struct mm_struct *mm) ^ cc1: warning: unrecognized command line option '-Wno-shift-negative-value' cc1: warning: unrecognized command line option '-Wno-stringop-overflow' Completed OK # rm -rf /kisskb/build/linus_allnoconfig_sparc64-gcc5 # Build took: 0:00:36.974682