From: Gabriele Monaco <gmonaco@redhat.com>
To: linux-kernel@vger.kernel.org,
Steven Rostedt <rostedt@goodmis.org>,
Gabriele Monaco <gmonaco@redhat.com>,
Masami Hiramatsu <mhiramat@kernel.org>,
Nam Cao <namcao@linutronix.de>,
linux-trace-kernel@vger.kernel.org
Cc: kernel test robot <lkp@intel.com>
Subject: [PATCH] rv: Fix 32-bit build of nomiss KUnit test
Date: Mon, 3 Aug 2026 17:06:22 +0200 [thread overview]
Message-ID: <20260803150622.322806-1-gmonaco@redhat.com> (raw)
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
next reply other threads:[~2026-08-03 15:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-03 15:06 Gabriele Monaco [this message]
2026-08-04 7:30 ` [PATCH] rv: Fix 32-bit build of nomiss KUnit test Nam Cao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260803150622.322806-1-gmonaco@redhat.com \
--to=gmonaco@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=mhiramat@kernel.org \
--cc=namcao@linutronix.de \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox