[rcu:dev.2020.05.26b 56/70] kernel/rcu/refperf.c:389: undefined reference to `__umoddi3'

From: kbuild test robot
Date: Mon Jun 01 2020 - 06:20:13 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev.2020.05.26b
head: 795279db1396bf66621fa3f343fa990fe543b89e
commit: 756c011f78747dc49a1e79a521fd77093849586b [56/70] refperf: Allow decimal nanoseconds
config: m68k-randconfig-r024-20200601 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 756c011f78747dc49a1e79a521fd77093849586b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>, old ones prefixed by <<):

m68k-linux-ld: kernel/rcu/refperf.o: in function `main_func':
>> kernel/rcu/refperf.c:389: undefined reference to `__umoddi3'
>> m68k-linux-ld: kernel/rcu/refperf.c:378: undefined reference to `__udivdi3'
m68k-linux-ld: kernel/rcu/refperf.c:389: undefined reference to `__udivdi3'

vim +389 kernel/rcu/refperf.c

328
329 // The main_func is the main orchestrator, it performs a bunch of
330 // experiments. For every experiment, it orders all the readers
331 // involved to start and waits for them to finish the experiment. It
332 // then reads their timestamps and starts the next experiment. Each
333 // experiment progresses from 1 concurrent reader to N of them at which
334 // point all the timestamps are printed.
335 static int main_func(void *arg)
336 {
337 int exp, r;
338 char buf1[64];
339 char buf[512];
340
341 set_cpus_allowed_ptr(current, cpumask_of(nreaders % nr_cpu_ids));
342 set_user_nice(current, MAX_NICE);
343
344 if (holdoff)
345 schedule_timeout_interruptible(holdoff * HZ);
346 VERBOSE_PERFOUT("main_func task started");
347 atomic_inc(&n_init);
348
349 // Wait for all threads to start.
350 wait_event(main_wq, atomic_read(&n_init) == (nreaders + 1));
351
352 // Start exp readers up per experiment
353 for (exp = 0; exp < nreaders && !torture_must_stop(); exp++) {
354 if (torture_must_stop())
355 goto end;
356
357 reset_readers(exp);
358 atomic_set(&nreaders_exp, exp + 1);
359
360 exp_idx = exp;
361
362 for (r = 0; r <= exp; r++) {
363 atomic_set(&reader_tasks[r].start, 1);
364 wake_up(&reader_tasks[r].wq);
365 }
366
367 VERBOSE_PERFOUT("main_func: experiment started, waiting for %d readers",
368 exp);
369
370 wait_event(main_wq,
371 !atomic_read(&nreaders_exp) || torture_must_stop());
372
373 VERBOSE_PERFOUT("main_func: experiment ended");
374
375 if (torture_must_stop())
376 goto end;
377
> 378 reader_tasks[exp].result_avg = 1000 * process_durations(exp) / ((exp + 1) * loops);
379 }
380
381 // Print the average of all experiments
382 PERFOUT("END OF TEST. Calculating average duration per loop (nanoseconds)...\n");
383
384 buf[0] = 0;
385 strcat(buf, "\n");
386 strcat(buf, "Threads\tTime(ns)\n");
387
388 for (exp = 0; exp < nreaders; exp++) {
> 389 sprintf(buf1, "%d\t%llu.%03d\n", exp + 1, reader_tasks[exp].result_avg / 1000, (int)(reader_tasks[exp].result_avg % 1000));
390 strcat(buf, buf1);
391 }
392
393 PERFOUT("%s", buf);
394
395 // This will shutdown everything including us.
396 if (shutdown) {
397 shutdown_start = 1;
398 wake_up(&shutdown_wq);
399 }
400
401 // Wait for torture to stop us
402 while (!torture_must_stop())
403 schedule_timeout_uninterruptible(1);
404
405 end:
406 torture_kthread_stopping("main_func");
407 return 0;
408 }
409

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip