lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202210130535.6RES1ZQH-lkp@intel.com>
Date:   Thu, 13 Oct 2022 05:53:51 +0800
From:   kernel test robot <lkp@...el.com>
To:     Yury Norov <yury.norov@...il.com>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org, kvm@...r.kernel.org,
        virtualization@...ts.linux-foundation.org, netdev@...r.kernel.org,
        "Michael S. Tsirkin" <mst@...hat.com>
Subject: [mst-vhost:vhost 9/11] drivers/scsi/lpfc/lpfc_init.c:12893:14:
 error: call to undeclared function 'cpumask_next_wrap_new'; ISO C99 and
 later do not support implicit function declarations

Hi Yury,

FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost
head:   60d086cbef0fd45b8dd5d5b79662803cd1b08cbc
commit: d5c59b2d8ff42128b3e8af65d08c47550af1e9a4 [9/11] lib/cpumask: drop 'new' suffix for cpumask_next_wrap()
config: arm64-randconfig-r035-20221012
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git/commit/?id=d5c59b2d8ff42128b3e8af65d08c47550af1e9a4
        git remote add mst-vhost https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git
        git fetch --no-tags mst-vhost vhost
        git checkout d5c59b2d8ff42128b3e8af65d08c47550af1e9a4
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash M=drivers/scsi/lpfc

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

>> drivers/scsi/lpfc/lpfc_init.c:12893:14: error: call to undeclared function 'cpumask_next_wrap_new'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                   cpu_next = cpumask_next_wrap_new(orig_mask, cpu + 1);
                              ^
   drivers/scsi/lpfc/lpfc_init.c:12893:14: note: did you mean 'cpumask_next_wrap'?
   include/linux/cpumask.h:247:14: note: 'cpumask_next_wrap' declared here
   unsigned int cpumask_next_wrap(const struct cpumask *srcp, int cpu)
                ^
   1 error generated.


vim +/cpumask_next_wrap_new +12893 drivers/scsi/lpfc/lpfc_init.c

dcaa213679387e9 James Smart  2019-11-04  12853  
dcaa213679387e9 James Smart  2019-11-04  12854  /**
dcaa213679387e9 James Smart  2019-11-04  12855   * lpfc_irq_rebalance - rebalances IRQ affinity according to cpuhp event
dcaa213679387e9 James Smart  2019-11-04  12856   * @phba: pointer to HBA context object.
dcaa213679387e9 James Smart  2019-11-04  12857   * @cpu: cpu going offline/online
dcaa213679387e9 James Smart  2019-11-04  12858   * @offline: true, cpu is going offline. false, cpu is coming online.
dcaa213679387e9 James Smart  2019-11-04  12859   *
dcaa213679387e9 James Smart  2019-11-04  12860   * If cpu is going offline, we'll try our best effort to find the next
3048e3e805e36a6 Dick Kennedy 2020-05-01  12861   * online cpu on the phba's original_mask and migrate all offlining IRQ
3048e3e805e36a6 Dick Kennedy 2020-05-01  12862   * affinities.
dcaa213679387e9 James Smart  2019-11-04  12863   *
3048e3e805e36a6 Dick Kennedy 2020-05-01  12864   * If cpu is coming online, reaffinitize the IRQ back to the onlining cpu.
dcaa213679387e9 James Smart  2019-11-04  12865   *
3048e3e805e36a6 Dick Kennedy 2020-05-01  12866   * Note: Call only if NUMA or NHT mode is enabled, otherwise rely on
dcaa213679387e9 James Smart  2019-11-04  12867   *	 PCI_IRQ_AFFINITY to auto-manage IRQ affinity.
dcaa213679387e9 James Smart  2019-11-04  12868   *
dcaa213679387e9 James Smart  2019-11-04  12869   **/
dcaa213679387e9 James Smart  2019-11-04  12870  static void
dcaa213679387e9 James Smart  2019-11-04  12871  lpfc_irq_rebalance(struct lpfc_hba *phba, unsigned int cpu, bool offline)
dcaa213679387e9 James Smart  2019-11-04  12872  {
dcaa213679387e9 James Smart  2019-11-04  12873  	struct lpfc_vector_map_info *cpup;
dcaa213679387e9 James Smart  2019-11-04  12874  	struct cpumask *aff_mask;
dcaa213679387e9 James Smart  2019-11-04  12875  	unsigned int cpu_select, cpu_next, idx;
3048e3e805e36a6 Dick Kennedy 2020-05-01  12876  	const struct cpumask *orig_mask;
dcaa213679387e9 James Smart  2019-11-04  12877  
3048e3e805e36a6 Dick Kennedy 2020-05-01  12878  	if (phba->irq_chann_mode == NORMAL_MODE)
dcaa213679387e9 James Smart  2019-11-04  12879  		return;
dcaa213679387e9 James Smart  2019-11-04  12880  
3048e3e805e36a6 Dick Kennedy 2020-05-01  12881  	orig_mask = &phba->sli4_hba.irq_aff_mask;
dcaa213679387e9 James Smart  2019-11-04  12882  
3048e3e805e36a6 Dick Kennedy 2020-05-01  12883  	if (!cpumask_test_cpu(cpu, orig_mask))
dcaa213679387e9 James Smart  2019-11-04  12884  		return;
dcaa213679387e9 James Smart  2019-11-04  12885  
dcaa213679387e9 James Smart  2019-11-04  12886  	cpup = &phba->sli4_hba.cpu_map[cpu];
dcaa213679387e9 James Smart  2019-11-04  12887  
dcaa213679387e9 James Smart  2019-11-04  12888  	if (!(cpup->flag & LPFC_CPU_FIRST_IRQ))
dcaa213679387e9 James Smart  2019-11-04  12889  		return;
dcaa213679387e9 James Smart  2019-11-04  12890  
dcaa213679387e9 James Smart  2019-11-04  12891  	if (offline) {
3048e3e805e36a6 Dick Kennedy 2020-05-01  12892  		/* Find next online CPU on original mask */
e40964cde137b58 Yury Norov   2022-10-11 @12893  		cpu_next = cpumask_next_wrap_new(orig_mask, cpu + 1);
e40964cde137b58 Yury Norov   2022-10-11  12894  		if (cpu_next == cpu)
e40964cde137b58 Yury Norov   2022-10-11  12895  			cpu_next = nr_cpu_ids;
3048e3e805e36a6 Dick Kennedy 2020-05-01  12896  		cpu_select = lpfc_next_online_cpu(orig_mask, cpu_next);
dcaa213679387e9 James Smart  2019-11-04  12897  
dcaa213679387e9 James Smart  2019-11-04  12898  		/* Found a valid CPU */
dcaa213679387e9 James Smart  2019-11-04  12899  		if ((cpu_select < nr_cpu_ids) && (cpu_select != cpu)) {
dcaa213679387e9 James Smart  2019-11-04  12900  			/* Go through each eqhdl and ensure offlining
dcaa213679387e9 James Smart  2019-11-04  12901  			 * cpu aff_mask is migrated
dcaa213679387e9 James Smart  2019-11-04  12902  			 */
dcaa213679387e9 James Smart  2019-11-04  12903  			for (idx = 0; idx < phba->cfg_irq_chann; idx++) {
dcaa213679387e9 James Smart  2019-11-04  12904  				aff_mask = lpfc_get_aff_mask(idx);
dcaa213679387e9 James Smart  2019-11-04  12905  
dcaa213679387e9 James Smart  2019-11-04  12906  				/* Migrate affinity */
dcaa213679387e9 James Smart  2019-11-04  12907  				if (cpumask_test_cpu(cpu, aff_mask))
dcaa213679387e9 James Smart  2019-11-04  12908  					lpfc_irq_set_aff(lpfc_get_eq_hdl(idx),
dcaa213679387e9 James Smart  2019-11-04  12909  							 cpu_select);
dcaa213679387e9 James Smart  2019-11-04  12910  			}
dcaa213679387e9 James Smart  2019-11-04  12911  		} else {
dcaa213679387e9 James Smart  2019-11-04  12912  			/* Rely on irqbalance if no online CPUs left on NUMA */
dcaa213679387e9 James Smart  2019-11-04  12913  			for (idx = 0; idx < phba->cfg_irq_chann; idx++)
dcaa213679387e9 James Smart  2019-11-04  12914  				lpfc_irq_clear_aff(lpfc_get_eq_hdl(idx));
dcaa213679387e9 James Smart  2019-11-04  12915  		}
dcaa213679387e9 James Smart  2019-11-04  12916  	} else {
dcaa213679387e9 James Smart  2019-11-04  12917  		/* Migrate affinity back to this CPU */
dcaa213679387e9 James Smart  2019-11-04  12918  		lpfc_irq_set_aff(lpfc_get_eq_hdl(cpup->eq), cpu);
dcaa213679387e9 James Smart  2019-11-04  12919  	}
dcaa213679387e9 James Smart  2019-11-04  12920  }
dcaa213679387e9 James Smart  2019-11-04  12921  

:::::: The code at line 12893 was first introduced by commit
:::::: e40964cde137b58777c751e9a1d85ae949935080 scsi: switch lpfc_irq_rebalance to new cpumask_next_wrap()

:::::: TO: Yury Norov <yury.norov@...il.com>
:::::: CC: Michael S. Tsirkin <mst@...hat.com>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (198359 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ