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: <202008112009.LsWXcFPv%lkp@intel.com>
Date:   Tue, 11 Aug 2020 20:38:13 +0800
From:   kernel test robot <lkp@...el.com>
To:     Luc Van Oostenryck <luc.vanoostenryck@...il.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: drivers/gpu/drm/radeon/radeon_ttm.c:979:21: sparse: sparse:
 incorrect type in initializer (different address spaces)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   00e4db51259a5f936fec1424b884f029479d3981
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date:   8 weeks ago
config: ia64-randconfig-s032-20200811 (attached as .config)
compiler: ia64-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.2-168-g9554805c-dirty
        git checkout 670d0a4b10704667765f7d18f7592993d02783aa
        # 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=ia64 

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/gpu/drm/radeon/radeon_ttm.c:979:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/radeon/radeon_ttm.c:979:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/radeon/radeon_ttm.c:979:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/radeon/radeon_ttm.c:979:21: sparse: sparse: cast removes address space '__user' of expression
>> drivers/gpu/drm/radeon/radeon_ttm.c:979:21: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned int [noderef] __user *__pu_ptr @@     got unsigned int [usertype] * @@
>> drivers/gpu/drm/radeon/radeon_ttm.c:979:21: sparse:     expected unsigned int [noderef] __user *__pu_ptr
   drivers/gpu/drm/radeon/radeon_ttm.c:979:21: sparse:     got unsigned int [usertype] *
   drivers/gpu/drm/radeon/radeon_ttm.c:979:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/radeon/radeon_ttm.c:979:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/radeon/radeon_ttm.c: note: in included file (through arch/ia64/include/asm/io.h, arch/ia64/include/asm/smp.h, arch/ia64/include/asm/topology.h, ...):
   include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] value @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:225:22: sparse:     expected unsigned int [usertype] value
   include/asm-generic/io.h:225:22: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] value @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:225:22: sparse:     expected unsigned int [usertype] value
   include/asm-generic/io.h:225:22: sparse:     got restricted __le32 [usertype]
   include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
--
>> drivers/gpu/drm/radeon/radeon_fb.c:264:22: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *s @@     got void *kptr @@
>> drivers/gpu/drm/radeon/radeon_fb.c:264:22: sparse:     expected void volatile [noderef] __iomem *s
   drivers/gpu/drm/radeon/radeon_fb.c:264:22: sparse:     got void *kptr
   drivers/gpu/drm/radeon/radeon_fb.c:271:27: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected char [noderef] __iomem *screen_base @@     got void *kptr @@
   drivers/gpu/drm/radeon/radeon_fb.c:271:27: sparse:     expected char [noderef] __iomem *screen_base
   drivers/gpu/drm/radeon/radeon_fb.c:271:27: sparse:     got void *kptr

vim +979 drivers/gpu/drm/radeon/radeon_ttm.c

771fe6b912fca54 Jerome Glisse         2009-06-05  782  
771fe6b912fca54 Jerome Glisse         2009-06-05 @783  int radeon_ttm_init(struct radeon_device *rdev)
771fe6b912fca54 Jerome Glisse         2009-06-05  784  {
771fe6b912fca54 Jerome Glisse         2009-06-05  785  	int r;
771fe6b912fca54 Jerome Glisse         2009-06-05  786  
771fe6b912fca54 Jerome Glisse         2009-06-05  787  	/* No others user of address space so set it to 0 */
771fe6b912fca54 Jerome Glisse         2009-06-05  788  	r = ttm_bo_device_init(&rdev->mman.bdev,
44d847b7439bdea David Herrmann        2013-08-13  789  			       &radeon_bo_driver,
44d847b7439bdea David Herrmann        2013-08-13  790  			       rdev->ddev->anon_inode->i_mapping,
8b53e1cb2728b63 Gerd Hoffmann         2019-09-05  791  			       rdev->ddev->vma_offset_manager,
33b3ad3788aba84 Christoph Hellwig     2019-08-15  792  			       dma_addressing_limited(&rdev->pdev->dev));
771fe6b912fca54 Jerome Glisse         2009-06-05  793  	if (r) {
771fe6b912fca54 Jerome Glisse         2009-06-05  794  		DRM_ERROR("failed initializing buffer object driver(%d).\n", r);
771fe6b912fca54 Jerome Glisse         2009-06-05  795  		return r;
771fe6b912fca54 Jerome Glisse         2009-06-05  796  	}
0a0c7596c643239 Jerome Glisse         2009-12-11  797  	rdev->mman.initialized = true;
4c7886791264f03 Jerome Glisse         2009-11-20  798  	r = ttm_bo_init_mm(&rdev->mman.bdev, TTM_PL_VRAM,
312ea8da049a183 Jerome Glisse         2009-12-07  799  				rdev->mc.real_vram_size >> PAGE_SHIFT);
771fe6b912fca54 Jerome Glisse         2009-06-05  800  	if (r) {
771fe6b912fca54 Jerome Glisse         2009-06-05  801  		DRM_ERROR("Failed initializing VRAM heap.\n");
771fe6b912fca54 Jerome Glisse         2009-06-05  802  		return r;
771fe6b912fca54 Jerome Glisse         2009-06-05  803  	}
14eedc32a3c0ec9 Lauri Kasanen         2014-02-28  804  	/* Change the size here instead of the init above so only lpfn is affected */
14eedc32a3c0ec9 Lauri Kasanen         2014-02-28  805  	radeon_ttm_set_active_vram_size(rdev, rdev->mc.visible_vram_size);
14eedc32a3c0ec9 Lauri Kasanen         2014-02-28  806  
441921d5309cfe0 Daniel Vetter         2011-02-18  807  	r = radeon_bo_create(rdev, 256 * 1024, PAGE_SIZE, true,
831b6966a60fe72 Maarten Lankhorst     2014-09-18  808  			     RADEON_GEM_DOMAIN_VRAM, 0, NULL,
4aa5b92fd48f88f Kent Russell          2017-08-08  809  			     NULL, &rdev->stolen_vga_memory);
771fe6b912fca54 Jerome Glisse         2009-06-05  810  	if (r) {
771fe6b912fca54 Jerome Glisse         2009-06-05  811  		return r;
771fe6b912fca54 Jerome Glisse         2009-06-05  812  	}
4aa5b92fd48f88f Kent Russell          2017-08-08  813  	r = radeon_bo_reserve(rdev->stolen_vga_memory, false);
4c7886791264f03 Jerome Glisse         2009-11-20  814  	if (r)
4c7886791264f03 Jerome Glisse         2009-11-20  815  		return r;
4aa5b92fd48f88f Kent Russell          2017-08-08  816  	r = radeon_bo_pin(rdev->stolen_vga_memory, RADEON_GEM_DOMAIN_VRAM, NULL);
4aa5b92fd48f88f Kent Russell          2017-08-08  817  	radeon_bo_unreserve(rdev->stolen_vga_memory);
771fe6b912fca54 Jerome Glisse         2009-06-05  818  	if (r) {
4aa5b92fd48f88f Kent Russell          2017-08-08  819  		radeon_bo_unref(&rdev->stolen_vga_memory);
771fe6b912fca54 Jerome Glisse         2009-06-05  820  		return r;
771fe6b912fca54 Jerome Glisse         2009-06-05  821  	}
771fe6b912fca54 Jerome Glisse         2009-06-05  822  	DRM_INFO("radeon: %uM of VRAM memory ready\n",
fc986034540102c Niels Ole Salscheider 2013-05-18  823  		 (unsigned) (rdev->mc.real_vram_size / (1024 * 1024)));
4c7886791264f03 Jerome Glisse         2009-11-20  824  	r = ttm_bo_init_mm(&rdev->mman.bdev, TTM_PL_TT,
312ea8da049a183 Jerome Glisse         2009-12-07  825  				rdev->mc.gtt_size >> PAGE_SHIFT);
771fe6b912fca54 Jerome Glisse         2009-06-05  826  	if (r) {
771fe6b912fca54 Jerome Glisse         2009-06-05  827  		DRM_ERROR("Failed initializing GTT heap.\n");
771fe6b912fca54 Jerome Glisse         2009-06-05  828  		return r;
771fe6b912fca54 Jerome Glisse         2009-06-05  829  	}
771fe6b912fca54 Jerome Glisse         2009-06-05  830  	DRM_INFO("radeon: %uM of GTT memory ready.\n",
3ce0a23d2d25318 Jerome Glisse         2009-09-08  831  		 (unsigned)(rdev->mc.gtt_size / (1024 * 1024)));
fa8a123855e2006 Dave Airlie           2009-08-26  832  
fa8a123855e2006 Dave Airlie           2009-08-26  833  	r = radeon_ttm_debugfs_init(rdev);
fa8a123855e2006 Dave Airlie           2009-08-26  834  	if (r) {
fa8a123855e2006 Dave Airlie           2009-08-26  835  		DRM_ERROR("Failed to init debugfs\n");
fa8a123855e2006 Dave Airlie           2009-08-26  836  		return r;
fa8a123855e2006 Dave Airlie           2009-08-26  837  	}
771fe6b912fca54 Jerome Glisse         2009-06-05  838  	return 0;
771fe6b912fca54 Jerome Glisse         2009-06-05  839  }
771fe6b912fca54 Jerome Glisse         2009-06-05  840  
771fe6b912fca54 Jerome Glisse         2009-06-05  841  void radeon_ttm_fini(struct radeon_device *rdev)
771fe6b912fca54 Jerome Glisse         2009-06-05  842  {
4c7886791264f03 Jerome Glisse         2009-11-20  843  	int r;
4c7886791264f03 Jerome Glisse         2009-11-20  844  
0a0c7596c643239 Jerome Glisse         2009-12-11  845  	if (!rdev->mman.initialized)
0a0c7596c643239 Jerome Glisse         2009-12-11  846  		return;
2014b5694182b54 Christian König       2013-12-18  847  	radeon_ttm_debugfs_fini(rdev);
4aa5b92fd48f88f Kent Russell          2017-08-08  848  	if (rdev->stolen_vga_memory) {
4aa5b92fd48f88f Kent Russell          2017-08-08  849  		r = radeon_bo_reserve(rdev->stolen_vga_memory, false);
4c7886791264f03 Jerome Glisse         2009-11-20  850  		if (r == 0) {
4aa5b92fd48f88f Kent Russell          2017-08-08  851  			radeon_bo_unpin(rdev->stolen_vga_memory);
4aa5b92fd48f88f Kent Russell          2017-08-08  852  			radeon_bo_unreserve(rdev->stolen_vga_memory);
4c7886791264f03 Jerome Glisse         2009-11-20  853  		}
4aa5b92fd48f88f Kent Russell          2017-08-08  854  		radeon_bo_unref(&rdev->stolen_vga_memory);
771fe6b912fca54 Jerome Glisse         2009-06-05  855  	}
771fe6b912fca54 Jerome Glisse         2009-06-05  856  	ttm_bo_clean_mm(&rdev->mman.bdev, TTM_PL_VRAM);
771fe6b912fca54 Jerome Glisse         2009-06-05  857  	ttm_bo_clean_mm(&rdev->mman.bdev, TTM_PL_TT);
771fe6b912fca54 Jerome Glisse         2009-06-05  858  	ttm_bo_device_release(&rdev->mman.bdev);
771fe6b912fca54 Jerome Glisse         2009-06-05  859  	radeon_gart_fini(rdev);
0a0c7596c643239 Jerome Glisse         2009-12-11  860  	rdev->mman.initialized = false;
771fe6b912fca54 Jerome Glisse         2009-06-05  861  	DRM_INFO("radeon: ttm finalized\n");
771fe6b912fca54 Jerome Glisse         2009-06-05  862  }
771fe6b912fca54 Jerome Glisse         2009-06-05  863  
5359533801e3dd3 Dave Airlie           2011-03-14  864  /* this should only be called at bootup or when userspace
5359533801e3dd3 Dave Airlie           2011-03-14  865   * isn't running */
5359533801e3dd3 Dave Airlie           2011-03-14  866  void radeon_ttm_set_active_vram_size(struct radeon_device *rdev, u64 size)
5359533801e3dd3 Dave Airlie           2011-03-14  867  {
5359533801e3dd3 Dave Airlie           2011-03-14  868  	struct ttm_mem_type_manager *man;
5359533801e3dd3 Dave Airlie           2011-03-14  869  
5359533801e3dd3 Dave Airlie           2011-03-14  870  	if (!rdev->mman.initialized)
5359533801e3dd3 Dave Airlie           2011-03-14  871  		return;
5359533801e3dd3 Dave Airlie           2011-03-14  872  
5359533801e3dd3 Dave Airlie           2011-03-14  873  	man = &rdev->mman.bdev.man[TTM_PL_VRAM];
5359533801e3dd3 Dave Airlie           2011-03-14  874  	/* this just adjusts TTM size idea, which sets lpfn to the correct value */
5359533801e3dd3 Dave Airlie           2011-03-14  875  	man->size = size >> PAGE_SHIFT;
5359533801e3dd3 Dave Airlie           2011-03-14  876  }
5359533801e3dd3 Dave Airlie           2011-03-14  877  
2bfb0b678e48dee Souptick Joarder      2018-04-16  878  static vm_fault_t radeon_ttm_fault(struct vm_fault *vmf)
771fe6b912fca54 Jerome Glisse         2009-06-05  879  {
771fe6b912fca54 Jerome Glisse         2009-06-05  880  	struct ttm_buffer_object *bo;
5876dd249e8e47c Matthew Garrett       2010-04-26  881  	struct radeon_device *rdev;
2bfb0b678e48dee Souptick Joarder      2018-04-16  882  	vm_fault_t ret;
771fe6b912fca54 Jerome Glisse         2009-06-05  883  
11bac80004499ea Dave Jiang            2017-02-24  884  	bo = (struct ttm_buffer_object *)vmf->vma->vm_private_data;
165d3448a1a0e86 Christian König       2019-09-27  885  	if (bo == NULL)
771fe6b912fca54 Jerome Glisse         2009-06-05  886  		return VM_FAULT_NOPAGE;
165d3448a1a0e86 Christian König       2019-09-27  887  
5876dd249e8e47c Matthew Garrett       2010-04-26  888  	rdev = radeon_get_rdev(bo->bdev);
db7fce3983ad9b3 Christian König       2012-05-11  889  	down_read(&rdev->pm.mclk_lock);
165d3448a1a0e86 Christian König       2019-09-27  890  	ret = ttm_bo_vm_fault(vmf);
db7fce3983ad9b3 Christian König       2012-05-11  891  	up_read(&rdev->pm.mclk_lock);
2bfb0b678e48dee Souptick Joarder      2018-04-16  892  	return ret;
771fe6b912fca54 Jerome Glisse         2009-06-05  893  }
771fe6b912fca54 Jerome Glisse         2009-06-05  894  
165d3448a1a0e86 Christian König       2019-09-27  895  static struct vm_operations_struct radeon_ttm_vm_ops = {
165d3448a1a0e86 Christian König       2019-09-27  896  	.fault = radeon_ttm_fault,
165d3448a1a0e86 Christian König       2019-09-27  897  	.open = ttm_bo_vm_open,
165d3448a1a0e86 Christian König       2019-09-27  898  	.close = ttm_bo_vm_close,
165d3448a1a0e86 Christian König       2019-09-27  899  	.access = ttm_bo_vm_access
165d3448a1a0e86 Christian König       2019-09-27  900  };
165d3448a1a0e86 Christian König       2019-09-27  901  
771fe6b912fca54 Jerome Glisse         2009-06-05  902  int radeon_mmap(struct file *filp, struct vm_area_struct *vma)
771fe6b912fca54 Jerome Glisse         2009-06-05  903  {
771fe6b912fca54 Jerome Glisse         2009-06-05  904  	int r;
bed2dd84212eb01 Thomas Zimmermann     2019-02-07  905  	struct drm_file *file_priv = filp->private_data;
bed2dd84212eb01 Thomas Zimmermann     2019-02-07  906  	struct radeon_device *rdev = file_priv->minor->dev->dev_private;
771fe6b912fca54 Jerome Glisse         2009-06-05  907  
165d3448a1a0e86 Christian König       2019-09-27  908  	if (rdev == NULL)
771fe6b912fca54 Jerome Glisse         2009-06-05  909  		return -EINVAL;
165d3448a1a0e86 Christian König       2019-09-27  910  
771fe6b912fca54 Jerome Glisse         2009-06-05  911  	r = ttm_bo_mmap(filp, vma, &rdev->mman.bdev);
165d3448a1a0e86 Christian König       2019-09-27  912  	if (unlikely(r != 0))
771fe6b912fca54 Jerome Glisse         2009-06-05  913  		return r;
165d3448a1a0e86 Christian König       2019-09-27  914  
771fe6b912fca54 Jerome Glisse         2009-06-05  915  	vma->vm_ops = &radeon_ttm_vm_ops;
771fe6b912fca54 Jerome Glisse         2009-06-05  916  	return 0;
771fe6b912fca54 Jerome Glisse         2009-06-05  917  }
771fe6b912fca54 Jerome Glisse         2009-06-05  918  
fa8a123855e2006 Dave Airlie           2009-08-26  919  #if defined(CONFIG_DEBUG_FS)
893d6e6e122386d Christian König       2013-12-12  920  
fa8a123855e2006 Dave Airlie           2009-08-26  921  static int radeon_mm_dump_table(struct seq_file *m, void *data)
fa8a123855e2006 Dave Airlie           2009-08-26  922  {
fa8a123855e2006 Dave Airlie           2009-08-26  923  	struct drm_info_node *node = (struct drm_info_node *)m->private;
893d6e6e122386d Christian König       2013-12-12  924  	unsigned ttm_pl = *(int*)node->info_ent->data;
fa8a123855e2006 Dave Airlie           2009-08-26  925  	struct drm_device *dev = node->minor->dev;
fa8a123855e2006 Dave Airlie           2009-08-26  926  	struct radeon_device *rdev = dev->dev_private;
bbbb29efa20d552 Christian König       2017-08-07  927  	struct ttm_mem_type_manager *man = &rdev->mman.bdev.man[ttm_pl];
b5c3714fe878974 Daniel Vetter         2016-12-29  928  	struct drm_printer p = drm_seq_file_printer(m);
fa8a123855e2006 Dave Airlie           2009-08-26  929  
bbbb29efa20d552 Christian König       2017-08-07  930  	man->func->debug(man, &p);
b5c3714fe878974 Daniel Vetter         2016-12-29  931  	return 0;
fa8a123855e2006 Dave Airlie           2009-08-26  932  }
893d6e6e122386d Christian König       2013-12-12  933  
bbbb29efa20d552 Christian König       2017-08-07  934  
893d6e6e122386d Christian König       2013-12-12  935  static int ttm_pl_vram = TTM_PL_VRAM;
893d6e6e122386d Christian König       2013-12-12  936  static int ttm_pl_tt = TTM_PL_TT;
893d6e6e122386d Christian König       2013-12-12  937  
893d6e6e122386d Christian König       2013-12-12  938  static struct drm_info_list radeon_ttm_debugfs_list[] = {
893d6e6e122386d Christian König       2013-12-12  939  	{"radeon_vram_mm", radeon_mm_dump_table, 0, &ttm_pl_vram},
893d6e6e122386d Christian König       2013-12-12  940  	{"radeon_gtt_mm", radeon_mm_dump_table, 0, &ttm_pl_tt},
893d6e6e122386d Christian König       2013-12-12  941  	{"ttm_page_pool", ttm_page_alloc_debugfs, 0, NULL},
893d6e6e122386d Christian König       2013-12-12  942  #ifdef CONFIG_SWIOTLB
893d6e6e122386d Christian König       2013-12-12  943  	{"ttm_dma_page_pool", ttm_dma_page_alloc_debugfs, 0, NULL}
893d6e6e122386d Christian König       2013-12-12  944  #endif
893d6e6e122386d Christian König       2013-12-12  945  };
893d6e6e122386d Christian König       2013-12-12  946  
2014b5694182b54 Christian König       2013-12-18  947  static int radeon_ttm_vram_open(struct inode *inode, struct file *filep)
2014b5694182b54 Christian König       2013-12-18  948  {
2014b5694182b54 Christian König       2013-12-18  949  	struct radeon_device *rdev = inode->i_private;
2014b5694182b54 Christian König       2013-12-18  950  	i_size_write(inode, rdev->mc.mc_vram_size);
2014b5694182b54 Christian König       2013-12-18  951  	filep->private_data = inode->i_private;
2014b5694182b54 Christian König       2013-12-18  952  	return 0;
2014b5694182b54 Christian König       2013-12-18  953  }
2014b5694182b54 Christian König       2013-12-18  954  
2014b5694182b54 Christian König       2013-12-18  955  static ssize_t radeon_ttm_vram_read(struct file *f, char __user *buf,
2014b5694182b54 Christian König       2013-12-18  956  				    size_t size, loff_t *pos)
2014b5694182b54 Christian König       2013-12-18  957  {
2014b5694182b54 Christian König       2013-12-18  958  	struct radeon_device *rdev = f->private_data;
2014b5694182b54 Christian König       2013-12-18  959  	ssize_t result = 0;
2014b5694182b54 Christian König       2013-12-18  960  	int r;
2014b5694182b54 Christian König       2013-12-18  961  
2014b5694182b54 Christian König       2013-12-18  962  	if (size & 0x3 || *pos & 0x3)
2014b5694182b54 Christian König       2013-12-18  963  		return -EINVAL;
2014b5694182b54 Christian König       2013-12-18  964  
2014b5694182b54 Christian König       2013-12-18  965  	while (size) {
2014b5694182b54 Christian König       2013-12-18  966  		unsigned long flags;
2014b5694182b54 Christian König       2013-12-18  967  		uint32_t value;
2014b5694182b54 Christian König       2013-12-18  968  
2014b5694182b54 Christian König       2013-12-18  969  		if (*pos >= rdev->mc.mc_vram_size)
2014b5694182b54 Christian König       2013-12-18  970  			return result;
2014b5694182b54 Christian König       2013-12-18  971  
2014b5694182b54 Christian König       2013-12-18  972  		spin_lock_irqsave(&rdev->mmio_idx_lock, flags);
2014b5694182b54 Christian König       2013-12-18  973  		WREG32(RADEON_MM_INDEX, ((uint32_t)*pos) | 0x80000000);
2014b5694182b54 Christian König       2013-12-18  974  		if (rdev->family >= CHIP_CEDAR)
2014b5694182b54 Christian König       2013-12-18  975  			WREG32(EVERGREEN_MM_INDEX_HI, *pos >> 31);
2014b5694182b54 Christian König       2013-12-18  976  		value = RREG32(RADEON_MM_DATA);
2014b5694182b54 Christian König       2013-12-18  977  		spin_unlock_irqrestore(&rdev->mmio_idx_lock, flags);
2014b5694182b54 Christian König       2013-12-18  978  
2014b5694182b54 Christian König       2013-12-18 @979  		r = put_user(value, (uint32_t *)buf);
2014b5694182b54 Christian König       2013-12-18  980  		if (r)
2014b5694182b54 Christian König       2013-12-18  981  			return r;
2014b5694182b54 Christian König       2013-12-18  982  
2014b5694182b54 Christian König       2013-12-18  983  		result += 4;
2014b5694182b54 Christian König       2013-12-18  984  		buf += 4;
2014b5694182b54 Christian König       2013-12-18  985  		*pos += 4;
2014b5694182b54 Christian König       2013-12-18  986  		size -= 4;
2014b5694182b54 Christian König       2013-12-18  987  	}
2014b5694182b54 Christian König       2013-12-18  988  
2014b5694182b54 Christian König       2013-12-18  989  	return result;
2014b5694182b54 Christian König       2013-12-18  990  }
2014b5694182b54 Christian König       2013-12-18  991  

:::::: The code at line 979 was first introduced by commit
:::::: 2014b5694182b54c781b93d26ec993f8a12bca01 drm/radeon: add VRAM debugfs access v3

:::::: TO: Christian König <christian.koenig@....com>
:::::: CC: Alex Deucher <alexander.deucher@....com>

---
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" (32326 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ