[jonmason-ntb:ntb-next 2/2] drivers/ntb/test/ntb_perf.c:1144: undefined reference to `__umoddi3'

kernel test robot
2022-04-18T05:23:19Z

tree: https://github.com/jonmason/ntb ntb-next
head: 10003e852471b1214f4383d79592497b3f4c7b39
commit: 10003e852471b1214f4383d79592497b3f4c7b39 [2/2] ntb_perf: extend with burst/poll/doorbell latency measurement
config: i386-randconfig-c021-20220418 (https://download.01.org/0day-ci/archive/20220418/202204181358.WWjsittG-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-19) 11.2.0
reproduce (this is a W=1 build):
# https://github.com/jonmason/ntb/commit/10003e852471b1214f4383d79592497b3f4c7b39
git remote add jonmason-ntb https://github.com/jonmason/ntb
git fetch --no-tags jonmason-ntb ntb-next
git checkout 10003e852471b1214f4383d79592497b3f4c7b39
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

ld: drivers/ntb/test/ntb_perf.o: in function `perf_run_latency':
>> drivers/ntb/test/ntb_perf.c:1144: undefined reference to `__umoddi3'

vim +1144 drivers/ntb/test/ntb_perf.c

1113
1114 static int perf_run_latency(struct perf_thread *pthr)
1115 {
1116 struct perf_peer *peer = pthr->perf->test_peer;
1117 struct ntb_dev *ntb = pthr->perf->ntb;
1118 void *flt_src;
1119 void __iomem *flt_dst, *bnd_dst;
1120 int ret;
1121 u64 stop_at = ktime_get_real_fast_ns() + lat_time_ms * NSEC_PER_MSEC;
1122
1123 pthr->tries = 0;
1124 pthr->latency = ktime_get();
1125 flt_src = pthr->src;
1126 flt_dst = peer->outbuf;
1127 bnd_dst = peer->outbuf + peer->outbuf_size;
1128
1129 while (ktime_get_real_fast_ns() < stop_at) {
1130 ret = perf_copy_chunk(pthr, flt_dst, flt_src, 1, false);
1131 if (ret) {
1132 dev_err(&ntb->dev, "%d: Latency testing error %d\n",
1133 pthr->tidx, ret);
1134 pthr->latency = ktime_set(0, 0);
1135 return ret;
1136 }
1137
1138 pthr->tries++;
1139 flt_dst++;
1140 flt_src++;
1141
1142 if (flt_dst >= bnd_dst || flt_dst < peer->outbuf) {
1143 flt_dst = peer->outbuf;
> 1144 flt_src = pthr->src;
1145 }
1146
1147 /* Avoid processor soft lock-ups */
1148 if (!(pthr->tries % RESCHEDULE_RATIO))
1149 schedule();
1150 }
1151
1152 /* Stop timer */
1153 pthr->latency = ktime_sub(ktime_get(), pthr->latency);
1154
1155 if (pthr->tries < LAT_MIN_TRIES) {
1156 dev_err(&ntb->dev, "%d: Too few steps to measure Latency. "
1157 "Increase test time\n", pthr->tidx);
1158 pthr->latency = ktime_set(0, 0);
1159 return -EINVAL;
1160 }
1161
1162 dev_dbg(&ntb->dev, "%d: made %llu tries, lasted %llu usecs\n",
1163 pthr->tidx, pthr->tries, ktime_to_us(pthr->latency));
1164
1165 pthr->latency = ns_to_ktime(ktime_divns(pthr->latency, pthr->tries));
1166
1167 dev_dbg(&ntb->dev, "%d: latency %llu us (%llu ns)\n", pthr->tidx,
1168 ktime_to_us(pthr->latency), ktime_to_ns(pthr->latency));
1169
1170 return 0;
1171 }
1172

--
0-DAY CI Kernel Test Service