All of lore.kernel.org
 help / color / mirror / Atom feed
* [zen:6.9/prjc 461/472] kernel/sched/alt_core.c:4207:14: error: call to undeclared function '__best_mask_cpu'; ISO C99 and later do not support implicit function declarations
@ 2024-05-17 10:34 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-05-17 10:34 UTC (permalink / raw)
  To: steven; +Cc: oe-kbuild-all

tree:   https://github.com/zen-kernel/zen-kernel 6.9/prjc
head:   90e00625dbe63d991978337198b3c43a1df585c9
commit: f90f6c0ad3cb7786aa8308e4669ea037dabf7476 [461/472] sched/alt: Generic active_balance_cpu_stop()
config: um-allnoconfig (https://download.01.org/0day-ci/archive/20240517/202405171813.gP8HoPQJ-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240517/202405171813.gP8HoPQJ-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/202405171813.gP8HoPQJ-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from kernel/sched/alt_core.c:19:
   In file included from include/linux/sched/isolation.h:7:
   In file included from include/linux/tick.h:8:
   In file included from include/linux/clockchips.h:14:
   In file included from include/linux/clocksource.h:22:
   In file included from arch/um/include/asm/io.h:24:
   include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     547 |         val = __raw_readb(PCI_IOBASE + addr);
         |                           ~~~~~~~~~~ ^
   include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     560 |         val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
         |                                                         ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
      37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
         |                                                   ^
   In file included from kernel/sched/alt_core.c:19:
   In file included from include/linux/sched/isolation.h:7:
   In file included from include/linux/tick.h:8:
   In file included from include/linux/clockchips.h:14:
   In file included from include/linux/clocksource.h:22:
   In file included from arch/um/include/asm/io.h:24:
   include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     573 |         val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
         |                                                         ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
      35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
         |                                                   ^
   In file included from kernel/sched/alt_core.c:19:
   In file included from include/linux/sched/isolation.h:7:
   In file included from include/linux/tick.h:8:
   In file included from include/linux/clockchips.h:14:
   In file included from include/linux/clocksource.h:22:
   In file included from arch/um/include/asm/io.h:24:
   include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     584 |         __raw_writeb(value, PCI_IOBASE + addr);
         |                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     594 |         __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
         |                                                       ~~~~~~~~~~ ^
   include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     604 |         __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
         |                                                       ~~~~~~~~~~ ^
   include/asm-generic/io.h:692:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     692 |         readsb(PCI_IOBASE + addr, buffer, count);
         |                ~~~~~~~~~~ ^
   include/asm-generic/io.h:700:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     700 |         readsw(PCI_IOBASE + addr, buffer, count);
         |                ~~~~~~~~~~ ^
   include/asm-generic/io.h:708:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     708 |         readsl(PCI_IOBASE + addr, buffer, count);
         |                ~~~~~~~~~~ ^
   include/asm-generic/io.h:717:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     717 |         writesb(PCI_IOBASE + addr, buffer, count);
         |                 ~~~~~~~~~~ ^
   include/asm-generic/io.h:726:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     726 |         writesw(PCI_IOBASE + addr, buffer, count);
         |                 ~~~~~~~~~~ ^
   include/asm-generic/io.h:735:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     735 |         writesl(PCI_IOBASE + addr, buffer, count);
         |                 ~~~~~~~~~~ ^
   In file included from kernel/sched/alt_core.c:48:
   kernel/sched/smp.h:14:20: error: redefinition of 'flush_smp_call_function_queue'
      14 | static inline void flush_smp_call_function_queue(void) { }
         |                    ^
   kernel/sched/alt_sched.h:357:20: note: previous definition is here
     357 | static inline void flush_smp_call_function_queue(void) { }
         |                    ^
>> kernel/sched/alt_core.c:4207:14: error: call to undeclared function '__best_mask_cpu'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    4207 |                 int dcpu = __best_mask_cpu(&tmp, per_cpu(sched_cpu_llc_mask, cpu_of(rq)));
         |                            ^
   kernel/sched/alt_core.c:4207:14: note: did you mean '__set_task_cpu'?
   kernel/sched/alt_core.c:1514:20: note: '__set_task_cpu' declared here
    1514 | static inline void __set_task_cpu(struct task_struct *p, unsigned int cpu)
         |                    ^
>> kernel/sched/alt_core.c:4207:44: error: use of undeclared identifier 'sched_cpu_llc_mask'; did you mean 'sched_idle_mask'?
    4207 |                 int dcpu = __best_mask_cpu(&tmp, per_cpu(sched_cpu_llc_mask, cpu_of(rq)));
         |                                                          ^~~~~~~~~~~~~~~~~~
         |                                                          sched_idle_mask
   include/linux/percpu-defs.h:269:43: note: expanded from macro 'per_cpu'
     269 | #define per_cpu(var, cpu)       (*per_cpu_ptr(&(var), cpu))
         |                                                 ^
   include/linux/percpu-defs.h:263:65: note: expanded from macro 'per_cpu_ptr'
     263 | #define per_cpu_ptr(ptr, cpu)   ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
         |                                                                   ^
   include/linux/percpu-defs.h:259:20: note: expanded from macro 'VERIFY_PERCPU_PTR'
     259 |         __verify_pcpu_ptr(__p);                                         \
         |                           ^
   include/linux/percpu-defs.h:219:47: note: expanded from macro '__verify_pcpu_ptr'
     219 |         const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL;    \
         |                                                      ^
   kernel/sched/alt_core.c:155:25: note: 'sched_idle_mask' declared here
     155 | static cpumask_t *const sched_idle_mask = &sched_preempt_mask[SCHED_QUEUE_BITS - 1];
         |                         ^
>> kernel/sched/alt_core.c:4207:44: error: use of undeclared identifier 'sched_cpu_llc_mask'; did you mean 'sched_idle_mask'?
    4207 |                 int dcpu = __best_mask_cpu(&tmp, per_cpu(sched_cpu_llc_mask, cpu_of(rq)));
         |                                                          ^~~~~~~~~~~~~~~~~~
         |                                                          sched_idle_mask
   include/linux/percpu-defs.h:269:43: note: expanded from macro 'per_cpu'
     269 | #define per_cpu(var, cpu)       (*per_cpu_ptr(&(var), cpu))
         |                                                 ^
   include/linux/percpu-defs.h:263:65: note: expanded from macro 'per_cpu_ptr'
     263 | #define per_cpu_ptr(ptr, cpu)   ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
         |                                                                   ^
   include/linux/percpu-defs.h:260:12: note: expanded from macro 'VERIFY_PERCPU_PTR'
     260 |         (typeof(*(__p)) __kernel __force *)(__p);                       \
         |                   ^
   kernel/sched/alt_core.c:155:25: note: 'sched_idle_mask' declared here
     155 | static cpumask_t *const sched_idle_mask = &sched_preempt_mask[SCHED_QUEUE_BITS - 1];
         |                         ^
>> kernel/sched/alt_core.c:4207:44: error: use of undeclared identifier 'sched_cpu_llc_mask'; did you mean 'sched_idle_mask'?
    4207 |                 int dcpu = __best_mask_cpu(&tmp, per_cpu(sched_cpu_llc_mask, cpu_of(rq)));
         |                                                          ^~~~~~~~~~~~~~~~~~
         |                                                          sched_idle_mask
   include/linux/percpu-defs.h:269:43: note: expanded from macro 'per_cpu'
     269 | #define per_cpu(var, cpu)       (*per_cpu_ptr(&(var), cpu))
         |                                                 ^
   include/linux/percpu-defs.h:263:65: note: expanded from macro 'per_cpu_ptr'
     263 | #define per_cpu_ptr(ptr, cpu)   ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
         |                                                                   ^
   include/linux/percpu-defs.h:260:38: note: expanded from macro 'VERIFY_PERCPU_PTR'
     260 |         (typeof(*(__p)) __kernel __force *)(__p);                       \
         |                                             ^
   kernel/sched/alt_core.c:155:25: note: 'sched_idle_mask' declared here
     155 | static cpumask_t *const sched_idle_mask = &sched_preempt_mask[SCHED_QUEUE_BITS - 1];
         |                         ^
>> kernel/sched/alt_core.c:4208:8: error: call to undeclared function 'move_queued_task'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    4208 |                 rq = move_queued_task(rq, p, dcpu);
         |                      ^
>> kernel/sched/alt_core.c:4208:6: error: incompatible integer to pointer conversion assigning to 'struct rq *' from 'int' [-Wint-conversion]
    4208 |                 rq = move_queued_task(rq, p, dcpu);
         |                    ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/sched/alt_core.c:4245:19: error: no member named 'active_balance_work' in 'struct rq'
    4245 |                                     arg, &rq->active_balance_work);
         |                                           ~~  ^
   kernel/sched/alt_core.c:4721:2: error: call to undeclared function 'hrtick_start'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    4721 |         hrtick_start(rq, next->time_slice);
         |         ^
   kernel/sched/alt_core.c:4721:2: note: did you mean 'hrtimer_start'?
   include/linux/hrtimer.h:272:20: note: 'hrtimer_start' declared here
     272 | static inline void hrtimer_start(struct hrtimer *timer, ktime_t tim,
         |                    ^
   kernel/sched/alt_core.c:7683:47: error: use of undeclared identifier 'sched_sg_idle_mask'; did you mean 'sched_idle_mask'?
    7683 |         struct balance_arg balance_arg = {.cpumask = sched_sg_idle_mask, .active = 0};
         |                                                      ^~~~~~~~~~~~~~~~~~
         |                                                      sched_idle_mask
   kernel/sched/alt_core.c:155:25: note: 'sched_idle_mask' declared here
     155 | static cpumask_t *const sched_idle_mask = &sched_preempt_mask[SCHED_QUEUE_BITS - 1];
         |                         ^
   12 warnings and 10 errors generated.


vim +/__best_mask_cpu +4207 kernel/sched/alt_core.c

  4188	
  4189	static int active_balance_cpu_stop(void *data)
  4190	{
  4191		struct balance_arg *arg = data;
  4192		struct task_struct *p = arg->task;
  4193		struct rq *rq = this_rq();
  4194		unsigned long flags;
  4195		cpumask_t tmp;
  4196	
  4197		local_irq_save(flags);
  4198	
  4199		raw_spin_lock(&p->pi_lock);
  4200		raw_spin_lock(&rq->lock);
  4201	
  4202		arg->active = 0;
  4203	
  4204		if (task_on_rq_queued(p) && task_rq(p) == rq &&
  4205		    cpumask_and(&tmp, p->cpus_ptr, arg->cpumask) &&
  4206		    !is_migration_disabled(p)) {
> 4207			int dcpu = __best_mask_cpu(&tmp, per_cpu(sched_cpu_llc_mask, cpu_of(rq)));
> 4208			rq = move_queued_task(rq, p, dcpu);
  4209		}
  4210	
  4211		raw_spin_unlock(&rq->lock);
  4212		raw_spin_unlock_irqrestore(&p->pi_lock, flags);
  4213	
  4214		return 0;
  4215	}
  4216	
  4217	/* trigger_active_balance - for @cpu/@rq */
  4218	static inline int
  4219	trigger_active_balance(struct rq *src_rq, struct rq *rq, struct balance_arg *arg)
  4220	{
  4221		unsigned long flags;
  4222		struct task_struct *p;
  4223		int res;
  4224	
  4225		if (!raw_spin_trylock_irqsave(&rq->lock, flags))
  4226			return 0;
  4227	
  4228		res = (1 == rq->nr_running) &&					\
  4229		      !is_migration_disabled((p = sched_rq_first_task(rq))) &&	\
  4230		      cpumask_intersects(p->cpus_ptr, arg->cpumask) &&		\
  4231		      !arg->active;
  4232		if (res) {
  4233			arg->task = p;
  4234	
  4235			arg->active = 1;
  4236		}
  4237	
  4238		raw_spin_unlock_irqrestore(&rq->lock, flags);
  4239	
  4240		if (res) {
  4241			preempt_disable();
  4242			raw_spin_unlock(&src_rq->lock);
  4243	
  4244			stop_one_cpu_nowait(cpu_of(rq), active_balance_cpu_stop,
> 4245					    arg, &rq->active_balance_work);
  4246	
  4247			preempt_enable();
  4248			raw_spin_lock(&src_rq->lock);
  4249		}
  4250	
  4251		return res;
  4252	}
  4253	

-- 
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:[~2024-05-17 10:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-17 10:34 [zen:6.9/prjc 461/472] kernel/sched/alt_core.c:4207:14: error: call to undeclared function '__best_mask_cpu'; ISO C99 and later do not support implicit function declarations 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.