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]
Date:   Sun, 1 Nov 2020 22:33:52 +0800
From:   kernel test robot <lkp@...el.com>
To:     Bjorn Andersson <bjorn.andersson@...aro.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: drivers/remoteproc/mtk_scp.c:306:39: sparse: sparse: incorrect type
 in argument 2 (different address spaces)

Hi Bjorn,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   c2dc4c073fb71b50904493657a7622b481b346e3
commit: 141bc97c1bfe31397b2a12e5676d0c2692c8e07e remoteproc/mediatek: Remove non-standard dsb()
date:   2 weeks ago
config: nios2-randconfig-s031-20201101 (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.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.3-76-gf680124b-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=141bc97c1bfe31397b2a12e5676d0c2692c8e07e
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 141bc97c1bfe31397b2a12e5676d0c2692c8e07e
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=nios2 

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


"sparse warnings: (new ones prefixed by >>)"
>> drivers/remoteproc/mtk_scp.c:306:39: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *addr @@
>> drivers/remoteproc/mtk_scp.c:306:39: sparse:     expected void volatile [noderef] __iomem *addr
>> drivers/remoteproc/mtk_scp.c:306:39: sparse:     got void *addr
   drivers/remoteproc/mtk_scp.c:307:19: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *addr @@
   drivers/remoteproc/mtk_scp.c:307:19: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/remoteproc/mtk_scp.c:307:19: sparse:     got void *addr
   drivers/remoteproc/mtk_scp.c:314:19: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *addr @@
   drivers/remoteproc/mtk_scp.c:314:19: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/remoteproc/mtk_scp.c:314:19: sparse:     got void *addr
   drivers/remoteproc/mtk_scp.c:316:39: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *addr @@
   drivers/remoteproc/mtk_scp.c:316:39: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/remoteproc/mtk_scp.c:316:39: sparse:     got void *addr
>> drivers/remoteproc/mtk_scp.c:327:44: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *addr @@     got void [noderef] __iomem * @@
>> drivers/remoteproc/mtk_scp.c:327:44: sparse:     expected void *addr
>> drivers/remoteproc/mtk_scp.c:327:44: sparse:     got void [noderef] __iomem *
   drivers/remoteproc/mtk_scp.c:328:44: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *addr @@     got void [noderef] __iomem * @@
   drivers/remoteproc/mtk_scp.c:328:44: sparse:     expected void *addr
   drivers/remoteproc/mtk_scp.c:328:44: sparse:     got void [noderef] __iomem *
   drivers/remoteproc/mtk_scp.c:329:44: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *addr @@     got void [noderef] __iomem * @@
   drivers/remoteproc/mtk_scp.c:329:44: sparse:     expected void *addr
   drivers/remoteproc/mtk_scp.c:329:44: sparse:     got void [noderef] __iomem *
   drivers/remoteproc/mtk_scp.c:330:44: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *addr @@     got void [noderef] __iomem * @@
   drivers/remoteproc/mtk_scp.c:330:44: sparse:     expected void *addr
   drivers/remoteproc/mtk_scp.c:330:44: sparse:     got void [noderef] __iomem *
   drivers/remoteproc/mtk_scp.c:331:44: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *addr @@     got void [noderef] __iomem * @@
   drivers/remoteproc/mtk_scp.c:331:44: sparse:     expected void *addr
   drivers/remoteproc/mtk_scp.c:331:44: sparse:     got void [noderef] __iomem *
   drivers/remoteproc/mtk_scp.c:431:45: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *addr @@     got void [noderef] __iomem * @@
   drivers/remoteproc/mtk_scp.c:431:45: sparse:     expected void *addr
   drivers/remoteproc/mtk_scp.c:431:45: sparse:     got void [noderef] __iomem *
   drivers/remoteproc/mtk_scp.c:432:45: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *addr @@     got void [noderef] __iomem * @@
   drivers/remoteproc/mtk_scp.c:432:45: sparse:     expected void *addr
   drivers/remoteproc/mtk_scp.c:432:45: sparse:     got void [noderef] __iomem *
   drivers/remoteproc/mtk_scp.c:433:45: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *addr @@     got void [noderef] __iomem * @@
   drivers/remoteproc/mtk_scp.c:433:45: sparse:     expected void *addr
   drivers/remoteproc/mtk_scp.c:433:45: sparse:     got void [noderef] __iomem *
   drivers/remoteproc/mtk_scp.c:434:45: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *addr @@     got void [noderef] __iomem * @@
   drivers/remoteproc/mtk_scp.c:434:45: sparse:     expected void *addr
   drivers/remoteproc/mtk_scp.c:434:45: sparse:     got void [noderef] __iomem *
   drivers/remoteproc/mtk_scp.c:435:45: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *addr @@     got void [noderef] __iomem * @@
   drivers/remoteproc/mtk_scp.c:435:45: sparse:     expected void *addr
   drivers/remoteproc/mtk_scp.c:435:45: sparse:     got void [noderef] __iomem *
   drivers/remoteproc/mtk_scp.c:559:23: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void [noderef] __iomem *cpu_addr @@     got void * @@
   drivers/remoteproc/mtk_scp.c:559:23: sparse:     expected void [noderef] __iomem *cpu_addr
   drivers/remoteproc/mtk_scp.c:559:23: sparse:     got void *
   drivers/remoteproc/mtk_scp.c:572:56: sparse: sparse: incorrect type in argument 3 (different address spaces) @@     expected void *cpu_addr @@     got void [noderef] __iomem *cpu_addr @@
   drivers/remoteproc/mtk_scp.c:572:56: sparse:     expected void *cpu_addr
   drivers/remoteproc/mtk_scp.c:572:56: sparse:     got void [noderef] __iomem *cpu_addr

vim +306 drivers/remoteproc/mtk_scp.c

fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21  300  
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21  301  static void mt8192_power_on_sram(void *addr)
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21  302  {
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21  303  	int i;
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21  304  
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21  305  	for (i = 31; i >= 0; i--)
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21 @306  		writel(GENMASK(i, 0), addr);
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21 @307  	writel(0, addr);
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21  308  }
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21  309  
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21  310  static void mt8192_power_off_sram(void *addr)
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21  311  {
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21  312  	int i;
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21  313  
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21  314  	writel(0, addr);
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21  315  	for (i = 0; i < 32; i++)
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21  316  		writel(GENMASK(i, 0), addr);
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21  317  }
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21  318  
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21  319  static int mt8192_scp_before_load(struct mtk_scp *scp)
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21  320  {
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21  321  	/* clear SPM interrupt, SCP2SPM_IPC_CLR */
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21  322  	writel(0xff, scp->reg_base + MT8192_SCP2SPM_IPC_CLR);
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21  323  
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21  324  	writel(1, scp->reg_base + MT8192_CORE0_SW_RSTN_SET);
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21  325  
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21  326  	/* enable SRAM clock */
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21 @327  	mt8192_power_on_sram(scp->reg_base + MT8192_L2TCM_SRAM_PD_0);
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21  328  	mt8192_power_on_sram(scp->reg_base + MT8192_L2TCM_SRAM_PD_1);
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21  329  	mt8192_power_on_sram(scp->reg_base + MT8192_L2TCM_SRAM_PD_2);
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21  330  	mt8192_power_on_sram(scp->reg_base + MT8192_L1TCM_SRAM_PDN);
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21  331  	mt8192_power_on_sram(scp->reg_base + MT8192_CPU0_SRAM_PD);
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21  332  
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21  333  	return 0;
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21  334  }
fd0b6c1ff85a48 Pi-Hsun Shih 2020-09-21  335  

:::::: The code at line 306 was first introduced by commit
:::::: fd0b6c1ff85a489bcf1bcf58af64da1aeffd39f0 remoteproc/mediatek: Add support for mt8192 SCP

:::::: TO: Pi-Hsun Shih <pihsun@...omium.org>
:::::: CC: Bjorn Andersson <bjorn.andersson@...aro.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (28551 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ