All of lore.kernel.org
 help / color / mirror / Atom feed
* [zen-kernel-zen-kernel:5.14/prjc 1/209] kernel/sched/alt_core.c:652:6: warning: no previous prototype for 'resched_curr'
@ 2021-09-14  9:29 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-09-14  9:29 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 23903 bytes --]

tree:   https://github.com/zen-kernel/zen-kernel 5.14/prjc
head:   d549588e3d79002f0c4b567b49644318af78a3db
commit: f746b5817d3274fa4f458f87f6b452e7304b1d64 [1/209] Project C v5.7.5-r2
config: um-x86_64_defconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/zen-kernel/zen-kernel/commit/f746b5817d3274fa4f458f87f6b452e7304b1d64
        git remote add zen-kernel-zen-kernel https://github.com/zen-kernel/zen-kernel
        git fetch --no-tags zen-kernel-zen-kernel 5.14/prjc
        git checkout f746b5817d3274fa4f458f87f6b452e7304b1d64
        # save the attached .config to linux build tree
        make W=1 ARCH=um SUBARCH=x86_64

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

All warnings (new ones prefixed by >>):

   In file included from kernel/sched/alt_core.c:191:
   kernel/sched/alt_core.c: In function 'dequeue_task':
   kernel/sched/bmq_imp.h:52:2: error: implicit declaration of function 'sched_info_dequeued'; did you mean 'sched_info_dequeue'? [-Werror=implicit-function-declaration]
      52 |  sched_info_dequeued(rq, p);   \
         |  ^~~~~~~~~~~~~~~~~~~
   kernel/sched/alt_core.c:444:2: note: in expansion of macro '__SCHED_DEQUEUE_TASK'
     444 |  __SCHED_DEQUEUE_TASK(p, rq, flags, update_sched_rq_watermark(rq));
         |  ^~~~~~~~~~~~~~~~~~~~
   kernel/sched/alt_core.c: In function 'enqueue_task':
   kernel/sched/bmq_imp.h:61:2: error: implicit declaration of function 'sched_info_queued'; did you mean 'sched_info_enqueue'? [-Werror=implicit-function-declaration]
      61 |  sched_info_queued(rq, p);     \
         |  ^~~~~~~~~~~~~~~~~
   kernel/sched/alt_core.c:461:2: note: in expansion of macro '__SCHED_ENQUEUE_TASK'
     461 |  __SCHED_ENQUEUE_TASK(p, rq, flags);
         |  ^~~~~~~~~~~~~~~~~~~~
   kernel/sched/alt_core.c: At top level:
>> kernel/sched/alt_core.c:652:6: warning: no previous prototype for 'resched_curr' [-Wmissing-prototypes]
     652 | void resched_curr(struct rq *rq)
         |      ^~~~~~~~~~~~
>> kernel/sched/alt_core.c:675:6: warning: no previous prototype for 'resched_cpu' [-Wmissing-prototypes]
     675 | void resched_cpu(int cpu)
         |      ^~~~~~~~~~~
   kernel/sched/alt_core.c: In function 'activate_task':
   kernel/sched/alt_core.c:955:6: error: implicit declaration of function 'task_contributes_to_load' [-Werror=implicit-function-declaration]
     955 |  if (task_contributes_to_load(p))
         |      ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/sched/alt_core.c: In function 'ttwu_stat':
>> kernel/sched/alt_core.c:1552:13: warning: variable 'rq' set but not used [-Wunused-but-set-variable]
    1552 |  struct rq *rq;
         |             ^~
   kernel/sched/alt_core.c: In function 'ttwu_do_wakeup':
   kernel/sched/alt_core.c:1578:5: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
    1578 |  p->state = TASK_RUNNING;
         |     ^~~~~
         |     __state
   kernel/sched/alt_core.c: In function 'try_to_wake_up':
   kernel/sched/alt_core.c:1793:12: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
    1793 |   if (!(p->state & state))
         |            ^~~~~
         |            __state
   kernel/sched/alt_core.c:1799:6: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
    1799 |   p->state = TASK_RUNNING;
         |      ^~~~~
         |      __state
   kernel/sched/alt_core.c:1812:11: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
    1812 |  if (!(p->state & state))
         |           ^~~~~
         |           __state
   kernel/sched/alt_core.c: In function 'sched_fork':
   kernel/sched/alt_core.c:1973:5: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
    1973 |  p->state = TASK_NEW;
         |     ^~~~~
         |     __state
   kernel/sched/alt_core.c: In function 'wake_up_new_task':
   kernel/sched/alt_core.c:2136:5: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
    2136 |  p->state = TASK_RUNNING;
         |     ^~~~~
         |     __state
   kernel/sched/alt_core.c: In function 'finish_task_switch':
   kernel/sched/alt_core.c:2384:21: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
    2384 |  prev_state = prev->state;
         |                     ^~~~~
         |                     __state
   kernel/sched/alt_core.c: In function 'schedule_tail':
   kernel/sched/alt_core.c:2433:13: warning: variable 'rq' set but not used [-Wunused-but-set-variable]
    2433 |  struct rq *rq;
         |             ^~
   kernel/sched/alt_core.c: At top level:
   kernel/sched/alt_core.c:2518:15: error: conflicting types for 'nr_running'
    2518 | unsigned long nr_running(void)
         |               ^~~~~~~~~~
   In file included from kernel/sched/alt_sched.h:16,
                    from kernel/sched/sched.h:6,
                    from kernel/sched/alt_core.c:14:
   include/linux/sched/stat.h:20:21: note: previous declaration of 'nr_running' was here
      20 | extern unsigned int nr_running(void);
         |                     ^~~~~~~~~~
   kernel/sched/alt_core.c:2565:15: error: conflicting types for 'nr_iowait_cpu'
    2565 | unsigned long nr_iowait_cpu(int cpu)
         |               ^~~~~~~~~~~~~
   In file included from kernel/sched/alt_sched.h:16,
                    from kernel/sched/sched.h:6,
                    from kernel/sched/alt_core.c:14:
   include/linux/sched/stat.h:23:21: note: previous declaration of 'nr_iowait_cpu' was here
      23 | extern unsigned int nr_iowait_cpu(int cpu);
         |                     ^~~~~~~~~~~~~
   kernel/sched/alt_core.c:2600:15: error: conflicting types for 'nr_iowait'
    2600 | unsigned long nr_iowait(void)
         |               ^~~~~~~~~
   In file included from kernel/sched/alt_sched.h:16,
                    from kernel/sched/sched.h:6,
                    from kernel/sched/alt_core.c:14:
   include/linux/sched/stat.h:22:21: note: previous declaration of 'nr_iowait' was here
      22 | extern unsigned int nr_iowait(void);
         |                     ^~~~~~~~~
   kernel/sched/alt_core.c:2706:6: error: conflicting types for 'arch_set_thermal_pressure'
    2706 | void arch_set_thermal_pressure(struct cpumask *cpus,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from kernel/sched/alt_sched.h:19,
                    from kernel/sched/sched.h:6,
                    from kernel/sched/alt_core.c:14:
   include/linux/sched/topology.h:264:6: note: previous definition of 'arch_set_thermal_pressure' was here
     264 | void arch_set_thermal_pressure(const struct cpumask *cpus,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/sched/alt_core.c: In function 'scheduler_tick':
   kernel/sched/alt_core.c:2753:2: error: implicit declaration of function 'psi_task_tick'; did you mean 'put_task_stack'? [-Werror=implicit-function-declaration]
    2753 |  psi_task_tick(rq);
         |  ^~~~~~~~~~~~~
         |  put_task_stack
   kernel/sched/alt_core.c: In function '__schedule_bug':
   kernel/sched/alt_core.c:3097:16: warning: passing argument 1 of 'print_ip_sym' makes pointer from integer without a cast [-Wint-conversion]
    3097 |   print_ip_sym(preempt_disable_ip);
         |                ^~~~~~~~~~~~~~~~~~
         |                |
         |                long unsigned int
   In file included from include/linux/bpf.h:20,
                    from include/linux/bpf-cgroup.h:5,
                    from include/linux/cgroup-defs.h:22,
                    from include/linux/cgroup.h:28,
                    from kernel/sched/alt_sched.h:24,
                    from kernel/sched/sched.h:6,
                    from kernel/sched/alt_core.c:14:
   include/linux/kallsyms.h:177:45: note: expected 'const char *' but argument is of type 'long unsigned int'
     177 | static inline void print_ip_sym(const char *loglvl, unsigned long ip)
         |                                 ~~~~~~~~~~~~^~~~~~
   kernel/sched/alt_core.c:3097:3: error: too few arguments to function 'print_ip_sym'
    3097 |   print_ip_sym(preempt_disable_ip);
         |   ^~~~~~~~~~~~
--
         |   ^~~~~~~~~~~~
         |   hrtimer_start
   kernel/sched/alt_core.c: In function '__schedule':
   kernel/sched/alt_core.c:3357:24: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
    3357 |  if (!preempt && prev->state) {
         |                        ^~~~~
         |                        __state
   kernel/sched/alt_core.c:3358:34: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
    3358 |   if (signal_pending_state(prev->state, prev)) {
         |                                  ^~~~~
         |                                  __state
   kernel/sched/alt_core.c:3359:10: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
    3359 |    prev->state = TASK_RUNNING;
         |          ^~~~~
         |          __state
   kernel/sched/alt_core.c: In function 'sched_submit_work':
   kernel/sched/alt_core.c:3438:12: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
    3438 |  if (!tsk->state)
         |            ^~~~~
         |            __state
   In file included from include/asm-generic/bug.h:7,
                    from ./arch/um/include/generated/asm/bug.h:1,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from include/asm-generic/current.h:5,
                    from ./arch/um/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from kernel/sched/alt_sched.h:4,
                    from kernel/sched/sched.h:6,
                    from kernel/sched/alt_core.c:14:
   kernel/sched/alt_core.c: In function 'schedule_idle':
   kernel/sched/alt_core.c:3512:24: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
    3512 |  WARN_ON_ONCE(current->state);
         |                        ^~~~~
   include/linux/once_lite.h:15:27: note: in definition of macro 'DO_ONCE_LITE_IF'
      15 |   bool __ret_do_once = !!(condition);   \
         |                           ^~~~~~~~~
   kernel/sched/alt_core.c:3512:2: note: in expansion of macro 'WARN_ON_ONCE'
    3512 |  WARN_ON_ONCE(current->state);
         |  ^~~~~~~~~~~~
   kernel/sched/alt_core.c: In function '__sched_setscheduler':
   kernel/sched/alt_core.c:4031:39: error: 'MAX_USER_RT_PRIO' undeclared (first use in this function); did you mean 'MAX_RT_PRIO'?
    4031 |      (p->mm && attr->sched_priority > MAX_USER_RT_PRIO - 1) ||
         |                                       ^~~~~~~~~~~~~~~~
         |                                       MAX_RT_PRIO
   kernel/sched/alt_core.c:4031:39: note: each undeclared identifier is reported only once for each function it appears in
   kernel/sched/alt_core.c: At top level:
   kernel/sched/alt_core.c:4749:13: error: redefinition of '_cond_resched'
    4749 | int __sched _cond_resched(void)
         |             ^~~~~~~~~~~~~
   In file included from kernel/sched/alt_sched.h:4,
                    from kernel/sched/sched.h:6,
                    from kernel/sched/alt_core.c:14:
   include/linux/sched.h:1948:19: note: previous definition of '_cond_resched' was here
    1948 | static inline int _cond_resched(void)
         |                   ^~~~~~~~~~~~~
   kernel/sched/alt_core.c: In function '__do_sys_sched_get_priority_max':
   kernel/sched/alt_core.c:4902:9: error: 'MAX_USER_RT_PRIO' undeclared (first use in this function); did you mean 'MAX_RT_PRIO'?
    4902 |   ret = MAX_USER_RT_PRIO-1;
         |         ^~~~~~~~~~~~~~~~
         |         MAX_RT_PRIO
   kernel/sched/alt_core.c: In function 'sched_show_task':
   kernel/sched/alt_core.c:5010:9: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
    5010 |  if (p->state == TASK_RUNNING)
         |         ^~~~~
         |         __state
   kernel/sched/alt_core.c:5025:2: error: too few arguments to function 'show_stack'
    5025 |  show_stack(p, NULL);
         |  ^~~~~~~~~~
   In file included from kernel/sched/alt_sched.h:9,
                    from kernel/sched/sched.h:6,
                    from kernel/sched/alt_core.c:14:
   include/linux/sched/debug.h:33:13: note: declared here
      33 | extern void show_stack(struct task_struct *task, unsigned long *sp,
         |             ^~~~~~~~~~
   kernel/sched/alt_core.c: In function 'state_filter_match':
   kernel/sched/alt_core.c:5038:11: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
    5038 |  if (!(p->state & state_filter))
         |           ^~~~~
         |           __state
   kernel/sched/alt_core.c:5045:49: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
    5045 |  if (state_filter == TASK_UNINTERRUPTIBLE && p->state == TASK_IDLE)
         |                                                 ^~~~~
         |                                                 __state
   kernel/sched/alt_core.c: At top level:
   kernel/sched/alt_core.c:5052:6: error: conflicting types for 'show_state_filter'
    5052 | void show_state_filter(unsigned long state_filter)
         |      ^~~~~~~~~~~~~~~~~
   In file included from kernel/sched/alt_sched.h:9,
                    from kernel/sched/sched.h:6,
                    from kernel/sched/alt_core.c:14:
   include/linux/sched/debug.h:17:13: note: previous declaration of 'show_state_filter' was here
      17 | extern void show_state_filter(unsigned int state_filter);
         |             ^~~~~~~~~~~~~~~~~
   kernel/sched/alt_core.c: In function 'init_idle':
   kernel/sched/alt_core.c:5118:8: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
    5118 |  idle->state = TASK_RUNNING;
         |        ^~~~~
         |        __state
   kernel/sched/alt_core.c: At top level:
>> kernel/sched/alt_core.c:5813:20: warning: no previous prototype for 'sched_create_group' [-Wmissing-prototypes]
    5813 | struct task_group *sched_create_group(struct task_group *parent)
         |                    ^~~~~~~~~~~~~~~~~~
>> kernel/sched/alt_core.c:5824:6: warning: no previous prototype for 'sched_online_group' [-Wmissing-prototypes]
    5824 | void sched_online_group(struct task_group *tg, struct task_group *parent)
         |      ^~~~~~~~~~~~~~~~~~
>> kernel/sched/alt_core.c:5835:6: warning: no previous prototype for 'sched_destroy_group' [-Wmissing-prototypes]
    5835 | void sched_destroy_group(struct task_group *tg)
         |      ^~~~~~~~~~~~~~~~~~~
>> kernel/sched/alt_core.c:5841:6: warning: no previous prototype for 'sched_offline_group' [-Wmissing-prototypes]
    5841 | void sched_offline_group(struct task_group *tg)
         |      ^~~~~~~~~~~~~~~~~~~
>> kernel/sched/alt_core.c:5933:20: warning: initialized field overwritten [-Woverride-init]
    5933 |  .legacy_cftypes = cpu_legacy_files,
         |                    ^~~~~~~~~~~~~~~~
   kernel/sched/alt_core.c:5933:20: note: (near initialization for 'cpu_cgrp_subsys.legacy_cftypes')
   kernel/sched/alt_core.c:142:18: warning: 'sched_sg_idle_mask' defined but not used [-Wunused-variable]
     142 | static cpumask_t sched_sg_idle_mask ____cacheline_aligned_in_smp;
         |                  ^~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/resched_curr +652 kernel/sched/alt_core.c

   453	
   454	static inline void enqueue_task(struct task_struct *p, struct rq *rq, int flags)
   455	{
   456		lockdep_assert_held(&rq->lock);
   457	
   458		WARN_ONCE(task_rq(p) != rq, "sched: enqueue task reside on cpu%d to cpu%d\n",
   459			  task_cpu(p), cpu_of(rq));
   460	
 > 461		__SCHED_ENQUEUE_TASK(p, rq, flags);
   462		update_sched_rq_watermark(rq);
   463		++rq->nr_running;
   464	#ifdef CONFIG_SMP
   465		if (2 == rq->nr_running)
   466			cpumask_set_cpu(cpu_of(rq), &sched_rq_pending_mask);
   467	#endif
   468	
   469		sched_update_tick_dependency(rq);
   470	
   471		/*
   472		 * If in_iowait is set, the code below may not trigger any cpufreq
   473		 * utilization updates, so do it here explicitly with the IOWAIT flag
   474		 * passed.
   475		 */
   476		if (p->in_iowait)
   477			cpufreq_update_util(rq, SCHED_CPUFREQ_IOWAIT);
   478	}
   479	
   480	static inline void requeue_task(struct task_struct *p, struct rq *rq)
   481	{
   482		lockdep_assert_held(&rq->lock);
   483		WARN_ONCE(task_rq(p) != rq, "sched: cpu[%d] requeue task reside on cpu%d\n",
   484			  cpu_of(rq), task_cpu(p));
   485	
   486		__requeue_task(p, rq);
   487	}
   488	
   489	/*
   490	 * cmpxchg based fetch_or, macro so it works for different integer types
   491	 */
   492	#define fetch_or(ptr, mask)						\
   493		({								\
   494			typeof(ptr) _ptr = (ptr);				\
   495			typeof(mask) _mask = (mask);				\
   496			typeof(*_ptr) _old, _val = *_ptr;			\
   497										\
   498			for (;;) {						\
   499				_old = cmpxchg(_ptr, _val, _val | _mask);	\
   500				if (_old == _val)				\
   501					break;					\
   502				_val = _old;					\
   503			}							\
   504		_old;								\
   505	})
   506	
   507	#if defined(CONFIG_SMP) && defined(TIF_POLLING_NRFLAG)
   508	/*
   509	 * Atomically set TIF_NEED_RESCHED and test for TIF_POLLING_NRFLAG,
   510	 * this avoids any races wrt polling state changes and thereby avoids
   511	 * spurious IPIs.
   512	 */
   513	static bool set_nr_and_not_polling(struct task_struct *p)
   514	{
   515		struct thread_info *ti = task_thread_info(p);
   516		return !(fetch_or(&ti->flags, _TIF_NEED_RESCHED) & _TIF_POLLING_NRFLAG);
   517	}
   518	
   519	/*
   520	 * Atomically set TIF_NEED_RESCHED if TIF_POLLING_NRFLAG is set.
   521	 *
   522	 * If this returns true, then the idle task promises to call
   523	 * sched_ttwu_pending() and reschedule soon.
   524	 */
   525	static bool set_nr_if_polling(struct task_struct *p)
   526	{
   527		struct thread_info *ti = task_thread_info(p);
   528		typeof(ti->flags) old, val = READ_ONCE(ti->flags);
   529	
   530		for (;;) {
   531			if (!(val & _TIF_POLLING_NRFLAG))
   532				return false;
   533			if (val & _TIF_NEED_RESCHED)
   534				return true;
   535			old = cmpxchg(&ti->flags, val, val | _TIF_NEED_RESCHED);
   536			if (old == val)
   537				break;
   538			val = old;
   539		}
   540		return true;
   541	}
   542	
   543	#else
   544	static bool set_nr_and_not_polling(struct task_struct *p)
   545	{
   546		set_tsk_need_resched(p);
   547		return true;
   548	}
   549	
   550	#ifdef CONFIG_SMP
   551	static bool set_nr_if_polling(struct task_struct *p)
   552	{
   553		return false;
   554	}
   555	#endif
   556	#endif
   557	
   558	static bool __wake_q_add(struct wake_q_head *head, struct task_struct *task)
   559	{
   560		struct wake_q_node *node = &task->wake_q;
   561	
   562		/*
   563		 * Atomically grab the task, if ->wake_q is !nil already it means
   564		 * its already queued (either by us or someone else) and will get the
   565		 * wakeup due to that.
   566		 *
   567		 * In order to ensure that a pending wakeup will observe our pending
   568		 * state, even in the failed case, an explicit smp_mb() must be used.
   569		 */
   570		smp_mb__before_atomic();
   571		if (unlikely(cmpxchg_relaxed(&node->next, NULL, WAKE_Q_TAIL)))
   572			return false;
   573	
   574		/*
   575		 * The head is context local, there can be no concurrency.
   576		 */
   577		*head->lastp = node;
   578		head->lastp = &node->next;
   579		return true;
   580	}
   581	
   582	/**
   583	 * wake_q_add() - queue a wakeup for 'later' waking.
   584	 * @head: the wake_q_head to add @task to
   585	 * @task: the task to queue for 'later' wakeup
   586	 *
   587	 * Queue a task for later wakeup, most likely by the wake_up_q() call in the
   588	 * same context, _HOWEVER_ this is not guaranteed, the wakeup can come
   589	 * instantly.
   590	 *
   591	 * This function must be used as-if it were wake_up_process(); IOW the task
   592	 * must be ready to be woken at this location.
   593	 */
   594	void wake_q_add(struct wake_q_head *head, struct task_struct *task)
   595	{
   596		if (__wake_q_add(head, task))
   597			get_task_struct(task);
   598	}
   599	
   600	/**
   601	 * wake_q_add_safe() - safely queue a wakeup for 'later' waking.
   602	 * @head: the wake_q_head to add @task to
   603	 * @task: the task to queue for 'later' wakeup
   604	 *
   605	 * Queue a task for later wakeup, most likely by the wake_up_q() call in the
   606	 * same context, _HOWEVER_ this is not guaranteed, the wakeup can come
   607	 * instantly.
   608	 *
   609	 * This function must be used as-if it were wake_up_process(); IOW the task
   610	 * must be ready to be woken at this location.
   611	 *
   612	 * This function is essentially a task-safe equivalent to wake_q_add(). Callers
   613	 * that already hold reference to @task can call the 'safe' version and trust
   614	 * wake_q to do the right thing depending whether or not the @task is already
   615	 * queued for wakeup.
   616	 */
   617	void wake_q_add_safe(struct wake_q_head *head, struct task_struct *task)
   618	{
   619		if (!__wake_q_add(head, task))
   620			put_task_struct(task);
   621	}
   622	
   623	void wake_up_q(struct wake_q_head *head)
   624	{
   625		struct wake_q_node *node = head->first;
   626	
   627		while (node != WAKE_Q_TAIL) {
   628			struct task_struct *task;
   629	
   630			task = container_of(node, struct task_struct, wake_q);
   631			BUG_ON(!task);
   632			/* task can safely be re-inserted now: */
   633			node = node->next;
   634			task->wake_q.next = NULL;
   635	
   636			/*
   637			 * wake_up_process() executes a full barrier, which pairs with
   638			 * the queueing in wake_q_add() so as not to miss wakeups.
   639			 */
   640			wake_up_process(task);
   641			put_task_struct(task);
   642		}
   643	}
   644	
   645	/*
   646	 * resched_curr - mark rq's current task 'to be rescheduled now'.
   647	 *
   648	 * On UP this means the setting of the need_resched flag, on SMP it
   649	 * might also involve a cross-CPU call to trigger the scheduler on
   650	 * the target CPU.
   651	 */
 > 652	void resched_curr(struct rq *rq)
   653	{
   654		struct task_struct *curr = rq->curr;
   655		int cpu;
   656	
   657		lockdep_assert_held(&rq->lock);
   658	
   659		if (test_tsk_need_resched(curr))
   660			return;
   661	
   662		cpu = cpu_of(rq);
   663		if (cpu == smp_processor_id()) {
   664			set_tsk_need_resched(curr);
   665			set_preempt_need_resched();
   666			return;
   667		}
   668	
   669		if (set_nr_and_not_polling(curr))
   670			smp_send_reschedule(cpu);
   671		else
   672			trace_sched_wake_idle_without_ipi(cpu);
   673	}
   674	
 > 675	void resched_cpu(int cpu)
   676	{
   677		struct rq *rq = cpu_rq(cpu);
   678		unsigned long flags;
   679	
   680		raw_spin_lock_irqsave(&rq->lock, flags);
   681		if (cpu_online(cpu) || cpu == smp_processor_id())
   682			resched_curr(cpu_rq(cpu));
   683		raw_spin_unlock_irqrestore(&rq->lock, flags);
   684	}
   685	

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 9503 bytes --]

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

only message in thread, other threads:[~2021-09-14  9:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-14  9:29 [zen-kernel-zen-kernel:5.14/prjc 1/209] kernel/sched/alt_core.c:652:6: warning: no previous prototype for 'resched_curr' kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.