[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202411110405.iwIkOMKq-lkp@intel.com>
Date: Mon, 11 Nov 2024 04:27:59 +0800
From: kernel test robot <lkp@...el.com>
To: Tejun Heo <tj@...nel.org>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: kernel/sched/ext.c:3538:31: warning: bitwise operation between
different enumeration types ('enum scx_enq_flags' and 'enum scx_deq_flags')
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: de2f378f2b771b39594c04695feee86476743a69
commit: f0e1a0643a59bf1f922fa209cec86a170b784f3f sched_ext: Implement BPF extensible scheduler class
date: 5 months ago
config: powerpc-randconfig-r054-20241110 (https://download.01.org/0day-ci/archive/20241111/202411110405.iwIkOMKq-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 592c0fe55f6d9a811028b5f3507be91458ab2713)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241111/202411110405.iwIkOMKq-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411110405.iwIkOMKq-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from kernel/sched/build_policy.c:25:
In file included from include/linux/livepatch.h:13:
In file included from include/linux/ftrace.h:10:
In file included from include/linux/trace_recursion.h:5:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:14:
In file included from arch/powerpc/include/asm/io.h:24:
In file included from include/linux/mm.h:2253:
include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
514 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
In file included from kernel/sched/build_policy.c:61:
kernel/sched/ext.c:3322:35: warning: bitwise operation between different enumeration types ('enum bpf_type_flag' and 'enum bpf_reg_type') [-Wenum-enum-conversion]
3322 | info->reg_type = PTR_MAYBE_NULL | PTR_TO_BTF_ID | PTR_TRUSTED;
| ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~
>> kernel/sched/ext.c:3538:31: warning: bitwise operation between different enumeration types ('enum scx_enq_flags' and 'enum scx_deq_flags') [-Wenum-enum-conversion]
3538 | WRITE_ONCE(v, SCX_ENQ_WAKEUP | SCX_DEQ_SLEEP);
| ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~
include/asm-generic/rwonce.h:61:18: note: expanded from macro 'WRITE_ONCE'
61 | __WRITE_ONCE(x, val); \
| ^~~
include/asm-generic/rwonce.h:55:33: note: expanded from macro '__WRITE_ONCE'
55 | *(volatile typeof(x) *)&(x) = (val); \
| ^~~
3 warnings generated.
vim +3538 kernel/sched/ext.c
3523
3524
3525 /********************************************************************************
3526 * System integration and init.
3527 */
3528
3529 void __init init_sched_ext_class(void)
3530 {
3531 s32 cpu, v;
3532
3533 /*
3534 * The following is to prevent the compiler from optimizing out the enum
3535 * definitions so that BPF scheduler implementations can use them
3536 * through the generated vmlinux.h.
3537 */
> 3538 WRITE_ONCE(v, SCX_ENQ_WAKEUP | SCX_DEQ_SLEEP);
3539
3540 BUG_ON(rhashtable_init(&dsq_hash, &dsq_hash_params));
3541 init_dsq(&scx_dsq_global, SCX_DSQ_GLOBAL);
3542 #ifdef CONFIG_SMP
3543 BUG_ON(!alloc_cpumask_var(&idle_masks.cpu, GFP_KERNEL));
3544 BUG_ON(!alloc_cpumask_var(&idle_masks.smt, GFP_KERNEL));
3545 #endif
3546 for_each_possible_cpu(cpu) {
3547 struct rq *rq = cpu_rq(cpu);
3548
3549 init_dsq(&rq->scx.local_dsq, SCX_DSQ_LOCAL);
3550 INIT_LIST_HEAD(&rq->scx.runnable_list);
3551 }
3552 }
3553
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists