* [PATCH] rv: Fix 32-bit build of nomiss KUnit test
@ 2026-08-03 15:06 Gabriele Monaco
2026-08-04 7:30 ` Nam Cao
0 siblings, 1 reply; 2+ messages in thread
From: Gabriele Monaco @ 2026-08-03 15:06 UTC (permalink / raw)
To: linux-kernel, Steven Rostedt, Gabriele Monaco, Masami Hiramatsu,
Nam Cao, linux-trace-kernel
Cc: kernel test robot
Commit 8da2a8838365 ("rv: Add KUnit tests for some DA/HA monitors")
introduced a division of a 64-bit value by 1000 in the nomiss KUnit
test. This does not compile on 32-bit systems, as standard division of
64-bit values leads to an undefined reference to __udivdi3.
Fix the build on 32-bit systems by using div_u64().
Fixes: 8da2a8838365 ("rv: Add KUnit tests for some DA/HA monitors")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202608020311.hYjqOG5k-lkp@intel.com
Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
---
kernel/trace/rv/monitors/nomiss/nomiss_kunit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/trace/rv/monitors/nomiss/nomiss_kunit.c b/kernel/trace/rv/monitors/nomiss/nomiss_kunit.c
index 1f64249dfcce..763129e2a990 100644
--- a/kernel/trace/rv/monitors/nomiss/nomiss_kunit.c
+++ b/kernel/trace/rv/monitors/nomiss/nomiss_kunit.c
@@ -28,7 +28,7 @@ static void rv_test_nomiss(struct kunit *test)
udelay(10);
rv_nomiss_ops.handle_sched_switch(NULL, 0, target, other, TASK_RUNNING);
RV_KUNIT_EXPECT_REACTION_HERE(test, ctx) {
- udelay(15 + *rv_nomiss_ops.deadline_thresh / 1000);
+ udelay(15 + div_u64(*rv_nomiss_ops.deadline_thresh, 1000));
rv_nomiss_ops.handle_sched_switch(NULL, 0, other, target, TASK_RUNNING);
}
}
base-commit: 984b5a36fd12d1849511a45fda32036fe2b0d004
--
2.55.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rv: Fix 32-bit build of nomiss KUnit test
2026-08-03 15:06 [PATCH] rv: Fix 32-bit build of nomiss KUnit test Gabriele Monaco
@ 2026-08-04 7:30 ` Nam Cao
0 siblings, 0 replies; 2+ messages in thread
From: Nam Cao @ 2026-08-04 7:30 UTC (permalink / raw)
To: Gabriele Monaco, linux-kernel, Steven Rostedt, Gabriele Monaco,
Masami Hiramatsu, linux-trace-kernel
Cc: kernel test robot
Gabriele Monaco <gmonaco@redhat.com> writes:
> Commit 8da2a8838365 ("rv: Add KUnit tests for some DA/HA monitors")
> introduced a division of a 64-bit value by 1000 in the nomiss KUnit
> test. This does not compile on 32-bit systems, as standard division of
> 64-bit values leads to an undefined reference to __udivdi3.
>
> Fix the build on 32-bit systems by using div_u64().
>
> Fixes: 8da2a8838365 ("rv: Add KUnit tests for some DA/HA monitors")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202608020311.hYjqOG5k-lkp@intel.com
> Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
Reviewed-by: Nam Cao <namcao@linutronix.de>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-04 7:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-03 15:06 [PATCH] rv: Fix 32-bit build of nomiss KUnit test Gabriele Monaco
2026-08-04 7:30 ` Nam Cao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox