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: <202211030628.j79W3cgg-lkp@intel.com>
Date:   Thu, 3 Nov 2022 06:58:47 +0800
From:   kernel test robot <lkp@...el.com>
To:     Anatolij Gustschin <agust@...x.de>
Cc:     oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
        Vinod Koul <vkoul@...nel.org>
Subject: drivers/dma/bestcomm/gen_bd.c:145:22: sparse: sparse: incorrect type
 in argument 1 (different address spaces)

Hi Anatolij,

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/torvalds/linux.git master
head:   8e5423e991e8cd0988d0c4a3f4ac4ca1af7d148a
commit: adec566b05288f2787a1f88dbaf77ed8b0c644fa dmaengine: bestcomm: fix system boot lockups
date:   1 year, 1 month ago
config: powerpc-randconfig-s032-20221102
compiler: powerpc-linux-gcc (GCC) 12.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=adec566b05288f2787a1f88dbaf77ed8b0c644fa
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout adec566b05288f2787a1f88dbaf77ed8b0c644fa
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=powerpc SHELL=/bin/bash arch/powerpc/platforms/52xx/ drivers/dma/bestcomm/

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

sparse warnings: (new ones prefixed by >>)
   drivers/dma/bestcomm/gen_bd.c:169:25: sparse: sparse: function 'bcom_gen_bd_tx_init' with external linkage has definition
>> drivers/dma/bestcomm/gen_bd.c:145:22: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *a @@     got struct bcom_bd *bd @@
   drivers/dma/bestcomm/gen_bd.c:145:22: sparse:     expected void volatile [noderef] __iomem *a
   drivers/dma/bestcomm/gen_bd.c:145:22: sparse:     got struct bcom_bd *bd
   drivers/dma/bestcomm/gen_bd.c:229:22: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *a @@     got struct bcom_bd *bd @@
   drivers/dma/bestcomm/gen_bd.c:229:22: sparse:     expected void volatile [noderef] __iomem *a
   drivers/dma/bestcomm/gen_bd.c:229:22: sparse:     got struct bcom_bd *bd
--
>> drivers/dma/bestcomm/bestcomm.c:98:30: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *a @@     got struct bcom_bd *bd @@
   drivers/dma/bestcomm/bestcomm.c:98:30: sparse:     expected void volatile [noderef] __iomem *a
   drivers/dma/bestcomm/bestcomm.c:98:30: sparse:     got struct bcom_bd *bd
>> drivers/dma/bestcomm/bestcomm.c:189:19: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *a @@     got unsigned int [usertype] *[assigned] var @@
   drivers/dma/bestcomm/bestcomm.c:189:19: sparse:     expected void volatile [noderef] __iomem *a
   drivers/dma/bestcomm/bestcomm.c:189:19: sparse:     got unsigned int [usertype] *[assigned] var
>> drivers/dma/bestcomm/bestcomm.c:190:19: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *a @@     got unsigned int [usertype] *[assigned] inc @@
   drivers/dma/bestcomm/bestcomm.c:190:19: sparse:     expected void volatile [noderef] __iomem *a
   drivers/dma/bestcomm/bestcomm.c:190:19: sparse:     got unsigned int [usertype] *[assigned] inc
>> drivers/dma/bestcomm/bestcomm.c:196:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *d @@     got unsigned int [usertype] *[assigned] desc @@
   drivers/dma/bestcomm/bestcomm.c:196:21: sparse:     expected void volatile [noderef] __iomem *d
   drivers/dma/bestcomm/bestcomm.c:196:21: sparse:     got unsigned int [usertype] *[assigned] desc
>> drivers/dma/bestcomm/bestcomm.c:197:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *d @@     got unsigned int [usertype] * @@
   drivers/dma/bestcomm/bestcomm.c:197:25: sparse:     expected void volatile [noderef] __iomem *d
   drivers/dma/bestcomm/bestcomm.c:197:25: sparse:     got unsigned int [usertype] *
>> drivers/dma/bestcomm/bestcomm.c:198:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *d @@     got unsigned int [usertype] *[assigned] inc @@
   drivers/dma/bestcomm/bestcomm.c:198:21: sparse:     expected void volatile [noderef] __iomem *d
   drivers/dma/bestcomm/bestcomm.c:198:21: sparse:     got unsigned int [usertype] *[assigned] inc
>> drivers/dma/bestcomm/bestcomm.c:305:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *a @@     got struct bcom_tdt *tdt @@
   drivers/dma/bestcomm/bestcomm.c:305:27: sparse:     expected void volatile [noderef] __iomem *a
   drivers/dma/bestcomm/bestcomm.c:305:27: sparse:     got struct bcom_tdt *tdt
>> drivers/dma/bestcomm/bestcomm.c:306:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *a @@     got unsigned int [usertype] *ctx @@
   drivers/dma/bestcomm/bestcomm.c:306:27: sparse:     expected void volatile [noderef] __iomem *a
   drivers/dma/bestcomm/bestcomm.c:306:27: sparse:     got unsigned int [usertype] *ctx
>> drivers/dma/bestcomm/bestcomm.c:307:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *a @@     got unsigned int [usertype] *var @@
   drivers/dma/bestcomm/bestcomm.c:307:27: sparse:     expected void volatile [noderef] __iomem *a
   drivers/dma/bestcomm/bestcomm.c:307:27: sparse:     got unsigned int [usertype] *var
>> drivers/dma/bestcomm/bestcomm.c:308:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *a @@     got unsigned int [usertype] *fdt @@
   drivers/dma/bestcomm/bestcomm.c:308:27: sparse:     expected void volatile [noderef] __iomem *a
   drivers/dma/bestcomm/bestcomm.c:308:27: sparse:     got unsigned int [usertype] *fdt
   drivers/dma/bestcomm/bestcomm.c:311:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *d @@     got unsigned int [usertype] * @@
   drivers/dma/bestcomm/bestcomm.c:311:35: sparse:     expected void volatile [noderef] __iomem *d
   drivers/dma/bestcomm/bestcomm.c:311:35: sparse:     got unsigned int [usertype] *

vim +145 drivers/dma/bestcomm/gen_bd.c

   112	
   113	int
   114	bcom_gen_bd_rx_reset(struct bcom_task *tsk)
   115	{
   116		struct bcom_gen_bd_priv *priv = tsk->priv;
   117		struct bcom_gen_bd_rx_var *var;
   118		struct bcom_gen_bd_rx_inc *inc;
   119	
   120		/* Shutdown the task */
   121		bcom_disable_task(tsk->tasknum);
   122	
   123		/* Reset the microcode */
   124		var = (struct bcom_gen_bd_rx_var *) bcom_task_var(tsk->tasknum);
   125		inc = (struct bcom_gen_bd_rx_inc *) bcom_task_inc(tsk->tasknum);
   126	
   127		if (bcom_load_image(tsk->tasknum, bcom_gen_bd_rx_task))
   128			return -1;
   129	
   130		var->enable	= bcom_eng->regs_base +
   131					offsetof(struct mpc52xx_sdma, tcr[tsk->tasknum]);
   132		var->fifo	= (u32) priv->fifo;
   133		var->bd_base	= tsk->bd_pa;
   134		var->bd_last	= tsk->bd_pa + ((tsk->num_bd-1) * tsk->bd_size);
   135		var->bd_start	= tsk->bd_pa;
   136		var->buffer_size = priv->maxbufsize;
   137	
   138		inc->incr_bytes	= -(s16)sizeof(u32);
   139		inc->incr_dst	= sizeof(u32);
   140	
   141		/* Reset the BDs */
   142		tsk->index = 0;
   143		tsk->outdex = 0;
   144	
 > 145		memset_io(tsk->bd, 0x00, tsk->num_bd * tsk->bd_size);
   146	
   147		/* Configure some stuff */
   148		bcom_set_task_pragma(tsk->tasknum, BCOM_GEN_RX_BD_PRAGMA);
   149		bcom_set_task_auto_start(tsk->tasknum, tsk->tasknum);
   150	
   151		out_8(&bcom_eng->regs->ipr[priv->initiator], priv->ipr);
   152		bcom_set_initiator(tsk->tasknum, priv->initiator);
   153	
   154		out_be32(&bcom_eng->regs->IntPend, 1<<tsk->tasknum);	/* Clear ints */
   155	
   156		return 0;
   157	}
   158	EXPORT_SYMBOL_GPL(bcom_gen_bd_rx_reset);
   159	

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ