Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [rcu:torture.2025.02.04a 1/10] kernel/rcu/rcutorture.c:1152:33: error: call to undeclared function 'get_torture_init_jiffies'; ISO C99 and later do not support implicit function declarations
@ 2025-02-06  1:39 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-02-06  1:39 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: llvm, oe-kbuild-all, Boqun Feng

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rcu/linux.git torture.2025.02.04a
head:   7b4389d6456ab5bca223c6cd4829724d984c8511
commit: 65c7582d8315f7f0451eac635d803b2def726d44 [1/10] rcutorture: Add a test_boost_holdoff module parameter
config: i386-buildonly-randconfig-004-20250206 (https://download.01.org/0day-ci/archive/20250206/202502060904.wYhRuUph-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250206/202502060904.wYhRuUph-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502060904.wYhRuUph-lkp@intel.com/

All errors (new ones prefixed by >>):

>> kernel/rcu/rcutorture.c:1152:33: error: call to undeclared function 'get_torture_init_jiffies'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    1152 |         unsigned long booststarttime = get_torture_init_jiffies() + test_boost_holdoff * HZ;
         |                                        ^
   1 error generated.


vim +/get_torture_init_jiffies +1152 kernel/rcu/rcutorture.c

  1145	
  1146	static int rcu_torture_boost(void *arg)
  1147	{
  1148		unsigned long endtime;
  1149		unsigned long gp_state;
  1150		unsigned long gp_state_time;
  1151		unsigned long oldstarttime;
> 1152		unsigned long booststarttime = get_torture_init_jiffies() + test_boost_holdoff * HZ;
  1153	
  1154		if (test_boost_holdoff <= 0 || time_after(jiffies, booststarttime)) {
  1155			VERBOSE_TOROUT_STRING("rcu_torture_boost started");
  1156		} else {
  1157			VERBOSE_TOROUT_STRING("rcu_torture_boost started holdoff period");
  1158			while (time_before(jiffies, booststarttime)) {
  1159				schedule_timeout_idle(HZ);
  1160				if (kthread_should_stop())
  1161					goto cleanup;
  1162			}
  1163			VERBOSE_TOROUT_STRING("rcu_torture_boost finished holdoff period");
  1164		}
  1165	
  1166		/* Set real-time priority. */
  1167		sched_set_fifo_low(current);
  1168	
  1169		/* Each pass through the following loop does one boost-test cycle. */
  1170		do {
  1171			bool failed = false; // Test failed already in this test interval
  1172			bool gp_initiated = false;
  1173	
  1174			if (kthread_should_stop())
  1175				goto checkwait;
  1176	
  1177			/* Wait for the next test interval. */
  1178			oldstarttime = READ_ONCE(boost_starttime);
  1179			while (time_before(jiffies, oldstarttime)) {
  1180				schedule_timeout_interruptible(oldstarttime - jiffies);
  1181				if (stutter_wait("rcu_torture_boost"))
  1182					sched_set_fifo_low(current);
  1183				if (torture_must_stop())
  1184					goto checkwait;
  1185			}
  1186	
  1187			// Do one boost-test interval.
  1188			endtime = oldstarttime + test_boost_duration * HZ;
  1189			while (time_before(jiffies, endtime)) {
  1190				// Has current GP gone too long?
  1191				if (gp_initiated && !failed && !cur_ops->poll_gp_state(gp_state))
  1192					failed = rcu_torture_boost_failed(gp_state, &gp_state_time);
  1193				// If we don't have a grace period in flight, start one.
  1194				if (!gp_initiated || cur_ops->poll_gp_state(gp_state)) {
  1195					gp_state = cur_ops->start_gp_poll();
  1196					gp_initiated = true;
  1197					gp_state_time = jiffies;
  1198				}
  1199				if (stutter_wait("rcu_torture_boost")) {
  1200					sched_set_fifo_low(current);
  1201					// If the grace period already ended,
  1202					// we don't know when that happened, so
  1203					// start over.
  1204					if (cur_ops->poll_gp_state(gp_state))
  1205						gp_initiated = false;
  1206				}
  1207				if (torture_must_stop())
  1208					goto checkwait;
  1209			}
  1210	
  1211			// In case the grace period extended beyond the end of the loop.
  1212			if (gp_initiated && !failed && !cur_ops->poll_gp_state(gp_state))
  1213				rcu_torture_boost_failed(gp_state, &gp_state_time);
  1214	
  1215			/*
  1216			 * Set the start time of the next test interval.
  1217			 * Yes, this is vulnerable to long delays, but such
  1218			 * delays simply cause a false negative for the next
  1219			 * interval.  Besides, we are running at RT priority,
  1220			 * so delays should be relatively rare.
  1221			 */
  1222			while (oldstarttime == READ_ONCE(boost_starttime) && !kthread_should_stop()) {
  1223				if (mutex_trylock(&boost_mutex)) {
  1224					if (oldstarttime == boost_starttime) {
  1225						WRITE_ONCE(boost_starttime,
  1226							   jiffies + test_boost_interval * HZ);
  1227						n_rcu_torture_boosts++;
  1228					}
  1229					mutex_unlock(&boost_mutex);
  1230					break;
  1231				}
  1232				schedule_timeout_uninterruptible(HZ / 20);
  1233			}
  1234	
  1235			/* Go do the stutter. */
  1236	checkwait:	if (stutter_wait("rcu_torture_boost"))
  1237				sched_set_fifo_low(current);
  1238		} while (!torture_must_stop());
  1239	
  1240	cleanup:
  1241		/* Clean up and exit. */
  1242		while (!kthread_should_stop()) {
  1243			torture_shutdown_absorb("rcu_torture_boost");
  1244			schedule_timeout_uninterruptible(HZ / 20);
  1245		}
  1246		torture_kthread_stopping("rcu_torture_boost");
  1247		return 0;
  1248	}
  1249	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-02-06  1:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-06  1:39 [rcu:torture.2025.02.04a 1/10] kernel/rcu/rcutorture.c:1152:33: error: call to undeclared function 'get_torture_init_jiffies'; ISO C99 and later do not support implicit function declarations kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox