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: <202407311737.VsJ0Sr1w-lkp@intel.com>
Date: Wed, 31 Jul 2024 17:44:41 +0800
From: kernel test robot <lkp@...el.com>
To: Ville Syrjälä <ville.syrjala@...ux.intel.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
	Tomi Valkeinen <tomi.valkeinen@...asonboard.com>
Subject: drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:122:16: sparse: sparse:
 incorrect type in argument 1 (different address spaces)

Hi Ville,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   e4fc196f5ba36eb7b9758cf2c73df49a44199895
commit: dc6fcaaba5a5411237d042a26c4d46689f3346bb drm/omap: Allow build with COMPILE_TEST=y
date:   3 months ago
config: sh-randconfig-r112-20240731 (https://download.01.org/0day-ci/archive/20240731/202407311737.VsJ0Sr1w-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 14.1.0
reproduce: (https://download.01.org/0day-ci/archive/20240731/202407311737.VsJ0Sr1w-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/202407311737.VsJ0Sr1w-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:122:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned int [usertype] *wa_dma_data @@
   drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:122:16: sparse:     expected void const volatile [noderef] __iomem *ptr
   drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:122:16: sparse:     got unsigned int [usertype] *wa_dma_data
   drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:130:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned int [usertype] *wa_dma_data @@
   drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:130:9: sparse:     expected void const volatile [noderef] __iomem *ptr
   drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:130:9: sparse:     got unsigned int [usertype] *wa_dma_data
>> drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:414:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned int * @@
   drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:414:9: sparse:     expected void const volatile [noderef] __iomem *ptr
   drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:414:9: sparse:     got unsigned int *
   drivers/gpu/drm/omapdrm/omap_dmm_tiler.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/xarray.h, ...):
   include/linux/page-flags.h:241:46: sparse: sparse: self-comparison always evaluates to false
   include/linux/page-flags.h:241:46: sparse: sparse: self-comparison always evaluates to false

vim +122 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c

f5b9930b85dc63 Tomi Valkeinen 2018-09-26  101  
f5b9930b85dc63 Tomi Valkeinen 2018-09-26  102  static u32 dmm_read_wa(struct dmm *dmm, u32 reg)
f5b9930b85dc63 Tomi Valkeinen 2018-09-26  103  {
f5b9930b85dc63 Tomi Valkeinen 2018-09-26  104  	dma_addr_t src, dst;
f5b9930b85dc63 Tomi Valkeinen 2018-09-26  105  	int r;
f5b9930b85dc63 Tomi Valkeinen 2018-09-26  106  
f5b9930b85dc63 Tomi Valkeinen 2018-09-26  107  	src = dmm->phys_base + reg;
f5b9930b85dc63 Tomi Valkeinen 2018-09-26  108  	dst = dmm->wa_dma_handle;
f5b9930b85dc63 Tomi Valkeinen 2018-09-26  109  
f5b9930b85dc63 Tomi Valkeinen 2018-09-26  110  	r = dmm_dma_copy(dmm, src, dst);
f5b9930b85dc63 Tomi Valkeinen 2018-09-26  111  	if (r) {
f5b9930b85dc63 Tomi Valkeinen 2018-09-26  112  		dev_err(dmm->dev, "sDMA read transfer timeout\n");
f5b9930b85dc63 Tomi Valkeinen 2018-09-26  113  		return readl(dmm->base + reg);
f5b9930b85dc63 Tomi Valkeinen 2018-09-26  114  	}
f5b9930b85dc63 Tomi Valkeinen 2018-09-26  115  
f5b9930b85dc63 Tomi Valkeinen 2018-09-26  116  	/*
f5b9930b85dc63 Tomi Valkeinen 2018-09-26  117  	 * As per i878 workaround, the DMA is used to access the DMM registers.
f5b9930b85dc63 Tomi Valkeinen 2018-09-26  118  	 * Make sure that the readl is not moved by the compiler or the CPU
f5b9930b85dc63 Tomi Valkeinen 2018-09-26  119  	 * earlier than the DMA finished writing the value to memory.
f5b9930b85dc63 Tomi Valkeinen 2018-09-26  120  	 */
f5b9930b85dc63 Tomi Valkeinen 2018-09-26  121  	rmb();
f5b9930b85dc63 Tomi Valkeinen 2018-09-26 @122  	return readl(dmm->wa_dma_data);
f5b9930b85dc63 Tomi Valkeinen 2018-09-26  123  }
f5b9930b85dc63 Tomi Valkeinen 2018-09-26  124  

:::::: The code at line 122 was first introduced by commit
:::::: f5b9930b85dc6319fd6bcc259e447eff62fc691c drm/omap: partial workaround for DRA7xx DMM errata i878

:::::: TO: Tomi Valkeinen <tomi.valkeinen@...com>
:::::: CC: Tomi Valkeinen <tomi.valkeinen@...com>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ