llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [ast-bpf:ma_v4 6/7] kernel/bpf/memalloc.c:452:3: error: call to undeclared function 'rcu_momentary_dyntick_idle2'; ISO C99 and later do not support implicit function declarations
@ 2023-06-09  5:07 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-06-09  5:07 UTC (permalink / raw)
  To: Alexei Starovoitov; +Cc: llvm, oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git ma_v4
head:   86c9deee3b8263f7546b8bad1e1a8d9662503ded
commit: 45acfe8484365cc1aa89e3d676697ce69ff4169b [6/7] hack 3
config: x86_64-randconfig-x064-20230608 (https://download.01.org/0day-ci/archive/20230609/202306091327.L3WtXkPd-lkp@intel.com/config)
compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project.git 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
reproduce (this is a W=1 build):
        mkdir -p ~/bin
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git/commit/?id=45acfe8484365cc1aa89e3d676697ce69ff4169b
        git remote add ast-bpf https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git
        git fetch --no-tags ast-bpf ma_v4
        git checkout 45acfe8484365cc1aa89e3d676697ce69ff4169b
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash kernel/

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/202306091327.L3WtXkPd-lkp@intel.com/

All errors (new ones prefixed by >>):

   kernel/bpf/memalloc.c:307:6: warning: variable 'cnt' set but not used [-Wunused-but-set-variable]
           int cnt;
               ^
   kernel/bpf/memalloc.c:327:6: warning: variable 'cnt' set but not used [-Wunused-but-set-variable]
           int cnt;
               ^
   kernel/bpf/memalloc.c:340:26: warning: unused variable 'batch' [-Wunused-variable]
           struct bpf_reuse_batch *batch;
                                   ^
>> kernel/bpf/memalloc.c:452:3: error: call to undeclared function 'rcu_momentary_dyntick_idle2'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
                   rcu_momentary_dyntick_idle2();
                   ^
   kernel/bpf/memalloc.c:452:3: note: did you mean 'rcu_momentary_dyntick_idle'?
   include/linux/rcutiny.h:159:20: note: 'rcu_momentary_dyntick_idle' declared here
   static inline void rcu_momentary_dyntick_idle(void) { }
                      ^
   3 warnings and 1 error generated.


vim +/rcu_momentary_dyntick_idle2 +452 kernel/bpf/memalloc.c

   417	
   418	static void reuse_bulk(struct bpf_mem_cache *c)
   419	{
   420		struct llist_node *head, *tail, *llnode, *tmp;
   421		unsigned long flags;
   422		struct bpf_reuse_batch *batch;
   423	
   424		if (IS_ENABLED(CONFIG_PREEMPT_RT))
   425			local_irq_save(flags);
   426		WARN_ON_ONCE(local_inc_return(&c->active) != 1);
   427		head = __llist_del_all(&c->prepare_reuse_head);
   428		tail = c->prepare_reuse_tail;
   429		c->prepare_reuse_tail = NULL;
   430		c->prepare_reuse_cnt = 0;
   431		local_dec(&c->active);
   432		if (IS_ENABLED(CONFIG_PREEMPT_RT))
   433			local_irq_restore(flags);
   434	
   435		llist_for_each_safe(llnode, tmp, llist_del_all(&c->free_llist_extra)) {
   436			if (!head)
   437				tail = llnode;
   438			llnode->next = head;
   439			head = llnode->next;
   440		}
   441		WARN_ON_ONCE(!head);
   442	
   443		/* bpf_mem_cache is a per-cpu object. Freeing happens in irq_work.
   444		 * Nothing races to add to free_by_rcu list.
   445		 */
   446		if (llist_empty(&c->free_by_rcu))
   447			c->free_by_rcu_tail = tail;
   448		__llist_add_batch(head, tail, &c->free_by_rcu);
   449	
   450		if (c->reuse_cb_in_progress >= 100 || 1) {
   451	//		local_irq_save(flags);
 > 452			rcu_momentary_dyntick_idle2();
   453	//		local_irq_restore(flags);
   454		}
   455	

-- 
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:[~2023-06-09  5:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-09  5:07 [ast-bpf:ma_v4 6/7] kernel/bpf/memalloc.c:452:3: error: call to undeclared function 'rcu_momentary_dyntick_idle2'; 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;
as well as URLs for NNTP newsgroup(s).