drivers/gpu/drm/ttm/ttm_bo_util.c:256:17: sparse: sparse: incorrect type in argument 1 (different address spaces)

From: kernel test robot
Date: Sun Aug 09 2020 - 00:33:24 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 06a81c1c7db9bd5de0bd38cd5acc44bb22b99150
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date: 7 weeks ago
config: arm-randconfig-s031-20200809 (attached as .config)
compiler: arm-linux-gnueabi-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-118-ge1578773-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=arm

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


sparse warnings: (new ones prefixed by >>)

drivers/gpu/drm/ttm/ttm_bo_util.c:219:30: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *[assigned] addr @@ got void [noderef] __iomem * @@
drivers/gpu/drm/ttm/ttm_bo_util.c:219:30: sparse: expected void *[assigned] addr
drivers/gpu/drm/ttm/ttm_bo_util.c:219:30: sparse: got void [noderef] __iomem *
drivers/gpu/drm/ttm/ttm_bo_util.c:221:30: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *[assigned] addr @@ got void [noderef] __iomem * @@
drivers/gpu/drm/ttm/ttm_bo_util.c:221:30: sparse: expected void *[assigned] addr
drivers/gpu/drm/ttm/ttm_bo_util.c:221:30: sparse: got void [noderef] __iomem *
drivers/gpu/drm/ttm/ttm_bo_util.c:241:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *iomem_cookie @@ got void *virtual @@
drivers/gpu/drm/ttm/ttm_bo_util.c:241:25: sparse: expected void volatile [noderef] __iomem *iomem_cookie
drivers/gpu/drm/ttm/ttm_bo_util.c:241:25: sparse: got void *virtual
>> drivers/gpu/drm/ttm/ttm_bo_util.c:256:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got unsigned int [usertype] * @@
drivers/gpu/drm/ttm/ttm_bo_util.c:256:17: sparse: expected void const [noderef] __iomem *addr
drivers/gpu/drm/ttm/ttm_bo_util.c:256:17: sparse: got unsigned int [usertype] *
drivers/gpu/drm/ttm/ttm_bo_util.c:256:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got unsigned int [usertype] * @@
drivers/gpu/drm/ttm/ttm_bo_util.c:256:17: sparse: expected void [noderef] __iomem *addr
drivers/gpu/drm/ttm/ttm_bo_util.c:256:17: sparse: got unsigned int [usertype] *
drivers/gpu/drm/ttm/ttm_bo_util.c:275:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const volatile [noderef] __iomem *from @@ got void *[assigned] src @@
drivers/gpu/drm/ttm/ttm_bo_util.c:275:9: sparse: expected void const volatile [noderef] __iomem *from
drivers/gpu/drm/ttm/ttm_bo_util.c:275:9: sparse: got void *[assigned] src
drivers/gpu/drm/ttm/ttm_bo_util.c:297:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *to @@ got void *[assigned] dst @@
drivers/gpu/drm/ttm/ttm_bo_util.c:297:9: sparse: expected void volatile [noderef] __iomem *to
drivers/gpu/drm/ttm/ttm_bo_util.c:297:9: sparse: got void *[assigned] dst
drivers/gpu/drm/ttm/ttm_bo_util.c:344:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *dst @@ got void *[addressable] new_iomap @@
drivers/gpu/drm/ttm/ttm_bo_util.c:344:17: sparse: expected void volatile [noderef] __iomem *dst
drivers/gpu/drm/ttm/ttm_bo_util.c:344:17: sparse: got void *[addressable] new_iomap
drivers/gpu/drm/ttm/ttm_bo_util.c:516:38: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *virtual @@ got void [noderef] __iomem * @@
drivers/gpu/drm/ttm/ttm_bo_util.c:516:38: sparse: expected void *virtual
drivers/gpu/drm/ttm/ttm_bo_util.c:516:38: sparse: got void [noderef] __iomem *
drivers/gpu/drm/ttm/ttm_bo_util.c:519:38: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *virtual @@ got void [noderef] __iomem * @@
drivers/gpu/drm/ttm/ttm_bo_util.c:519:38: sparse: expected void *virtual
drivers/gpu/drm/ttm/ttm_bo_util.c:519:38: sparse: got void [noderef] __iomem *
drivers/gpu/drm/ttm/ttm_bo_util.c:608:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *iomem_cookie @@ got void *virtual @@
drivers/gpu/drm/ttm/ttm_bo_util.c:608:28: sparse: expected void volatile [noderef] __iomem *iomem_cookie
drivers/gpu/drm/ttm/ttm_bo_util.c:608:28: sparse: got void *virtual
--
>> drivers/input/misc/ixp4xx-beeper.c:39:18: sparse: sparse: cast removes address space '__iomem' of expression
drivers/input/misc/ixp4xx-beeper.c:43:18: sparse: sparse: cast removes address space '__iomem' of expression
drivers/input/misc/ixp4xx-beeper.c:80:10: sparse: sparse: cast removes address space '__iomem' of expression
--
>> drivers/gpu/drm/armada/armada_fbdev.c:85:27: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected char [noderef] __iomem *screen_base @@ got void *[assigned] ptr @@
>> drivers/gpu/drm/armada/armada_fbdev.c:85:27: sparse: expected char [noderef] __iomem *screen_base
drivers/gpu/drm/armada/armada_fbdev.c:85:27: sparse: got void *[assigned] ptr
--
>> drivers/gpu/drm/armada/armada_gem.c:61:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *iomem_cookie @@ got void *addr @@
>> drivers/gpu/drm/armada/armada_gem.c:61:37: sparse: expected void volatile [noderef] __iomem *iomem_cookie
drivers/gpu/drm/armada/armada_gem.c:61:37: sparse: got void *addr
>> drivers/gpu/drm/armada/armada_gem.c:183:28: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *addr @@ got void [noderef] __iomem * @@
drivers/gpu/drm/armada/armada_gem.c:183:28: sparse: expected void *addr
>> drivers/gpu/drm/armada/armada_gem.c:183:28: sparse: got void [noderef] __iomem *
--
drivers/gpu/drm/qxl/qxl_kms.c:36:5: sparse: sparse: symbol 'qxl_log_level' was not declared. Should it be static?
drivers/gpu/drm/qxl/qxl_kms.c:170:19: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct qxl_rom *rom @@ got void [noderef] __iomem * @@
drivers/gpu/drm/qxl/qxl_kms.c:170:19: sparse: expected struct qxl_rom *rom
drivers/gpu/drm/qxl/qxl_kms.c:170:19: sparse: got void [noderef] __iomem *
drivers/gpu/drm/qxl/qxl_kms.c:188:26: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct qxl_ram_header *ram_header @@ got void [noderef] __iomem * @@
drivers/gpu/drm/qxl/qxl_kms.c:188:26: sparse: expected struct qxl_ram_header *ram_header
drivers/gpu/drm/qxl/qxl_kms.c:188:26: sparse: got void [noderef] __iomem *
>> drivers/gpu/drm/qxl/qxl_kms.c:277:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *iomem_cookie @@ got struct qxl_ram_header *ram_header @@
>> drivers/gpu/drm/qxl/qxl_kms.c:277:21: sparse: expected void volatile [noderef] __iomem *iomem_cookie
drivers/gpu/drm/qxl/qxl_kms.c:277:21: sparse: got struct qxl_ram_header *ram_header
>> drivers/gpu/drm/qxl/qxl_kms.c:281:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *iomem_cookie @@ got struct qxl_rom *rom @@
drivers/gpu/drm/qxl/qxl_kms.c:281:21: sparse: expected void volatile [noderef] __iomem *iomem_cookie
drivers/gpu/drm/qxl/qxl_kms.c:281:21: sparse: got struct qxl_rom *rom
drivers/gpu/drm/qxl/qxl_kms.c:301:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *iomem_cookie @@ got struct qxl_ram_header *ram_header @@
drivers/gpu/drm/qxl/qxl_kms.c:301:21: sparse: expected void volatile [noderef] __iomem *iomem_cookie
drivers/gpu/drm/qxl/qxl_kms.c:301:21: sparse: got struct qxl_ram_header *ram_header
drivers/gpu/drm/qxl/qxl_kms.c:302:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *iomem_cookie @@ got struct qxl_rom *rom @@
drivers/gpu/drm/qxl/qxl_kms.c:302:21: sparse: expected void volatile [noderef] __iomem *iomem_cookie
drivers/gpu/drm/qxl/qxl_kms.c:302:21: sparse: got struct qxl_rom *rom
--
drivers/pci/switch/switchtec.c:943:31: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected unsigned int [noderef] [usertype] __iomem * @@ got void * @@
drivers/pci/switch/switchtec.c:943:31: sparse: expected unsigned int [noderef] [usertype] __iomem *
drivers/pci/switch/switchtec.c:943:31: sparse: got void *
drivers/pci/switch/switchtec.c:951:39: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected unsigned int [noderef] [usertype] __iomem * @@ got void * @@
drivers/pci/switch/switchtec.c:951:39: sparse: expected unsigned int [noderef] [usertype] __iomem *
drivers/pci/switch/switchtec.c:951:39: sparse: got void *
drivers/pci/switch/switchtec.c:954:39: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected unsigned int [noderef] [usertype] __iomem * @@ got void * @@
drivers/pci/switch/switchtec.c:954:39: sparse: expected unsigned int [noderef] [usertype] __iomem *
drivers/pci/switch/switchtec.c:954:39: sparse: got void *
drivers/pci/switch/switchtec.c:1067:32: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got struct switchtec_ioctl_pff_port *up @@
drivers/pci/switch/switchtec.c:1067:32: sparse: expected void const [noderef] __user *from
drivers/pci/switch/switchtec.c:1067:32: sparse: got struct switchtec_ioctl_pff_port *up
drivers/pci/switch/switchtec.c:1072:22: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct part_cfg_regs *pcfg @@ got struct part_cfg_regs [noderef] __iomem * @@
drivers/pci/switch/switchtec.c:1072:22: sparse: expected struct part_cfg_regs *pcfg
drivers/pci/switch/switchtec.c:1072:22: sparse: got struct part_cfg_regs [noderef] __iomem *
>> drivers/pci/switch/switchtec.c:1075:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got unsigned int * @@
>> drivers/pci/switch/switchtec.c:1075:23: sparse: expected void const [noderef] __iomem *addr
drivers/pci/switch/switchtec.c:1075:23: sparse: got unsigned int *
drivers/pci/switch/switchtec.c:1081:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got unsigned int * @@
drivers/pci/switch/switchtec.c:1081:23: sparse: expected void const [noderef] __iomem *addr
drivers/pci/switch/switchtec.c:1081:23: sparse: got unsigned int *
drivers/pci/switch/switchtec.c:1088:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got unsigned int * @@
drivers/pci/switch/switchtec.c:1088:31: sparse: expected void const [noderef] __iomem *addr
drivers/pci/switch/switchtec.c:1088:31: sparse: got unsigned int *
drivers/pci/switch/switchtec.c:1100:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __user *to @@ got struct switchtec_ioctl_pff_port *up @@
drivers/pci/switch/switchtec.c:1100:26: sparse: expected void [noderef] __user *to
drivers/pci/switch/switchtec.c:1100:26: sparse: got struct switchtec_ioctl_pff_port *up
drivers/pci/switch/switchtec.c:1112:32: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got struct switchtec_ioctl_pff_port *up @@
drivers/pci/switch/switchtec.c:1112:32: sparse: expected void const [noderef] __user *from
drivers/pci/switch/switchtec.c:1112:32: sparse: got struct switchtec_ioctl_pff_port *up
drivers/pci/switch/switchtec.c:1116:22: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct part_cfg_regs *pcfg @@ got struct part_cfg_regs [noderef] __iomem *mmio_part_cfg @@
drivers/pci/switch/switchtec.c:1116:22: sparse: expected struct part_cfg_regs *pcfg
drivers/pci/switch/switchtec.c:1116:22: sparse: got struct part_cfg_regs [noderef] __iomem *mmio_part_cfg
drivers/pci/switch/switchtec.c:1118:22: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct part_cfg_regs *pcfg @@ got struct part_cfg_regs [noderef] __iomem * @@
drivers/pci/switch/switchtec.c:1118:22: sparse: expected struct part_cfg_regs *pcfg
drivers/pci/switch/switchtec.c:1118:22: sparse: got struct part_cfg_regs [noderef] __iomem *
drivers/pci/switch/switchtec.c:1124:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got unsigned int * @@
drivers/pci/switch/switchtec.c:1124:25: sparse: expected void const [noderef] __iomem *addr
drivers/pci/switch/switchtec.c:1124:25: sparse: got unsigned int *
drivers/pci/switch/switchtec.c:1127:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got unsigned int * @@
drivers/pci/switch/switchtec.c:1127:25: sparse: expected void const [noderef] __iomem *addr
drivers/pci/switch/switchtec.c:1127:25: sparse: got unsigned int *
drivers/pci/switch/switchtec.c:1134:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got unsigned int * @@
drivers/pci/switch/switchtec.c:1134:25: sparse: expected void const [noderef] __iomem *addr
drivers/pci/switch/switchtec.c:1134:25: sparse: got unsigned int *
drivers/pci/switch/switchtec.c:1138:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __user *to @@ got struct switchtec_ioctl_pff_port *up @@
drivers/pci/switch/switchtec.c:1138:26: sparse: expected void [noderef] __user *to
drivers/pci/switch/switchtec.c:1138:26: sparse: got struct switchtec_ioctl_pff_port *up
drivers/pci/switch/switchtec.c:1171:47: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct switchtec_ioctl_pff_port *up @@ got void [noderef] __user *argp @@
drivers/pci/switch/switchtec.c:1171:47: sparse: expected struct switchtec_ioctl_pff_port *up
drivers/pci/switch/switchtec.c:1171:47: sparse: got void [noderef] __user *argp
drivers/pci/switch/switchtec.c:1174:47: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct switchtec_ioctl_pff_port *up @@ got void [noderef] __user *argp @@
drivers/pci/switch/switchtec.c:1174:47: sparse: expected struct switchtec_ioctl_pff_port *up
drivers/pci/switch/switchtec.c:1174:47: sparse: got void [noderef] __user *argp
drivers/pci/switch/switchtec.c:1487:43: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct part_cfg_regs *pcfg @@ got struct part_cfg_regs [noderef] __iomem *mmio_part_cfg @@
drivers/pci/switch/switchtec.c:1487:43: sparse: expected struct part_cfg_regs *pcfg
drivers/pci/switch/switchtec.c:1487:43: sparse: got struct part_cfg_regs [noderef] __iomem *mmio_part_cfg
drivers/pci/switch/switchtec.c:1497:15: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got unsigned int * @@
drivers/pci/switch/switchtec.c:1497:15: sparse: expected void const [noderef] __iomem *addr
drivers/pci/switch/switchtec.c:1497:15: sparse: got unsigned int *
drivers/pci/switch/switchtec.c:1501:15: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got unsigned int * @@
drivers/pci/switch/switchtec.c:1501:15: sparse: expected void const [noderef] __iomem *addr
drivers/pci/switch/switchtec.c:1501:15: sparse: got unsigned int *
drivers/pci/switch/switchtec.c:1506:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got unsigned int * @@
drivers/pci/switch/switchtec.c:1506:23: sparse: expected void const [noderef] __iomem *addr
drivers/pci/switch/switchtec.c:1506:23: sparse: got unsigned int *
--
drivers/scsi/mvumi.c:81:52: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void * @@
drivers/scsi/mvumi.c:81:52: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:81:52: sparse: got void *
drivers/scsi/mvumi.c:90:39: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void * @@ got void [noderef] __iomem * @@
drivers/scsi/mvumi.c:90:39: sparse: expected void *
drivers/scsi/mvumi.c:90:39: sparse: got void [noderef] __iomem *
drivers/scsi/mvumi.c:210:34: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] baseaddr_l @@ got restricted __le32 [usertype] @@
drivers/scsi/mvumi.c:210:34: sparse: expected unsigned int [usertype] baseaddr_l
drivers/scsi/mvumi.c:210:34: sparse: got restricted __le32 [usertype]
drivers/scsi/mvumi.c:211:34: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] baseaddr_h @@ got restricted __le32 [usertype] @@
drivers/scsi/mvumi.c:211:34: sparse: expected unsigned int [usertype] baseaddr_h
drivers/scsi/mvumi.c:211:34: sparse: got restricted __le32 [usertype]
drivers/scsi/mvumi.c:213:17: sparse: sparse: invalid assignment: |=
drivers/scsi/mvumi.c:213:17: sparse: left side has type unsigned int
drivers/scsi/mvumi.c:213:17: sparse: right side has type restricted __le32
drivers/scsi/mvumi.c:213:17: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] size @@ got restricted __le32 [usertype] @@
drivers/scsi/mvumi.c:213:17: sparse: expected unsigned int [usertype] size
drivers/scsi/mvumi.c:213:17: sparse: got restricted __le32 [usertype]
drivers/scsi/mvumi.c:242:26: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] baseaddr_l @@ got restricted __le32 [usertype] @@
drivers/scsi/mvumi.c:242:26: sparse: expected unsigned int [usertype] baseaddr_l
drivers/scsi/mvumi.c:242:26: sparse: got restricted __le32 [usertype]
drivers/scsi/mvumi.c:243:26: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] baseaddr_h @@ got restricted __le32 [usertype] @@
drivers/scsi/mvumi.c:243:26: sparse: expected unsigned int [usertype] baseaddr_h
drivers/scsi/mvumi.c:243:26: sparse: got restricted __le32 [usertype]
drivers/scsi/mvumi.c:245:9: sparse: sparse: invalid assignment: |=
drivers/scsi/mvumi.c:245:9: sparse: left side has type unsigned int
drivers/scsi/mvumi.c:245:9: sparse: right side has type restricted __le32
drivers/scsi/mvumi.c:245:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] size @@ got restricted __le32 [usertype] @@
drivers/scsi/mvumi.c:245:9: sparse: expected unsigned int [usertype] size
drivers/scsi/mvumi.c:245:9: sparse: got restricted __le32 [usertype]
>> drivers/scsi/mvumi.c:407:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got void *inb_read_pointer @@
>> drivers/scsi/mvumi.c:407:21: sparse: expected void const [noderef] __iomem *addr
drivers/scsi/mvumi.c:407:21: sparse: got void *inb_read_pointer
>> drivers/scsi/mvumi.c:429:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got void *ib_shadow @@
drivers/scsi/mvumi.c:429:17: sparse: expected void const [noderef] __iomem *addr
drivers/scsi/mvumi.c:429:17: sparse: got void *ib_shadow
drivers/scsi/mvumi.c:458:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *ib_shadow @@
drivers/scsi/mvumi.c:458:9: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:458:9: sparse: got void *ib_shadow
drivers/scsi/mvumi.c:459:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *inb_write_pointer @@
drivers/scsi/mvumi.c:459:9: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:459:9: sparse: got void *inb_write_pointer
>> drivers/scsi/mvumi.c:496:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got void *outb_copy_pointer @@
drivers/scsi/mvumi.c:496:28: sparse: expected void const [noderef] __iomem *addr
drivers/scsi/mvumi.c:496:28: sparse: got void *outb_copy_pointer
>> drivers/scsi/mvumi.c:497:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got void *ob_shadow @@
drivers/scsi/mvumi.c:497:35: sparse: expected void const [noderef] __iomem *addr
drivers/scsi/mvumi.c:497:35: sparse: got void *ob_shadow
>> drivers/scsi/mvumi.c:516:20: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got void *outb_read_pointer @@
drivers/scsi/mvumi.c:516:20: sparse: expected void const [noderef] __iomem *addr
drivers/scsi/mvumi.c:516:20: sparse: got void *outb_read_pointer
drivers/scsi/mvumi.c:517:20: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got void *outb_copy_pointer @@
drivers/scsi/mvumi.c:517:20: sparse: expected void const [noderef] __iomem *addr
drivers/scsi/mvumi.c:517:20: sparse: got void *outb_copy_pointer
drivers/scsi/mvumi.c:578:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *outb_read_pointer @@
drivers/scsi/mvumi.c:578:9: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:578:9: sparse: got void *outb_read_pointer
drivers/scsi/mvumi.c:585:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *enpointa_mask_reg @@
drivers/scsi/mvumi.c:585:9: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:585:9: sparse: got void *enpointa_mask_reg
>> drivers/scsi/mvumi.c:586:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got void *arm_to_pciea_msg1 @@
drivers/scsi/mvumi.c:586:13: sparse: expected void const [noderef] __iomem *addr
drivers/scsi/mvumi.c:586:13: sparse: got void *arm_to_pciea_msg1
drivers/scsi/mvumi.c:589:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *pciea_to_arm_drbl_reg @@
drivers/scsi/mvumi.c:589:9: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:589:9: sparse: got void *pciea_to_arm_drbl_reg
>> drivers/scsi/mvumi.c:1281:15: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got void *arm_to_pciea_drbl_reg @@
drivers/scsi/mvumi.c:1281:15: sparse: expected void const [noderef] __iomem *addr
drivers/scsi/mvumi.c:1281:15: sparse: got void *arm_to_pciea_drbl_reg
drivers/scsi/mvumi.c:1282:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *arm_to_pciea_drbl_reg @@
drivers/scsi/mvumi.c:1282:9: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:1282:9: sparse: got void *arm_to_pciea_drbl_reg
drivers/scsi/mvumi.c:1284:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *arm_to_pciea_mask_reg @@
drivers/scsi/mvumi.c:1284:9: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:1284:9: sparse: got void *arm_to_pciea_mask_reg
>> drivers/scsi/mvumi.c:1285:15: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got void *enpointa_mask_reg @@
drivers/scsi/mvumi.c:1285:15: sparse: expected void const [noderef] __iomem *addr
drivers/scsi/mvumi.c:1285:15: sparse: got void *enpointa_mask_reg
drivers/scsi/mvumi.c:1286:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *enpointa_mask_reg @@
drivers/scsi/mvumi.c:1286:9: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:1286:9: sparse: got void *enpointa_mask_reg
drivers/scsi/mvumi.c:612:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *enpointa_mask_reg @@
drivers/scsi/mvumi.c:612:9: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:612:9: sparse: got void *enpointa_mask_reg
drivers/scsi/mvumi.c:613:15: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got void *arm_to_pciea_msg1 @@
drivers/scsi/mvumi.c:613:15: sparse: expected void const [noderef] __iomem *addr
drivers/scsi/mvumi.c:613:15: sparse: got void *arm_to_pciea_msg1
drivers/scsi/mvumi.c:615:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *pciea_to_arm_drbl_reg @@
drivers/scsi/mvumi.c:615:17: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:615:17: sparse: got void *pciea_to_arm_drbl_reg
drivers/scsi/mvumi.c:624:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got void *arm_to_pciea_msg1 @@
drivers/scsi/mvumi.c:624:23: sparse: expected void const [noderef] __iomem *addr
drivers/scsi/mvumi.c:624:23: sparse: got void *arm_to_pciea_msg1
drivers/scsi/mvumi.c:670:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *reset_enable @@
drivers/scsi/mvumi.c:670:9: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:670:9: sparse: got void *reset_enable
drivers/scsi/mvumi.c:671:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *reset_request @@
drivers/scsi/mvumi.c:671:9: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:671:9: sparse: got void *reset_request
drivers/scsi/mvumi.c:673:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *reset_enable @@
drivers/scsi/mvumi.c:673:9: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:673:9: sparse: got void *reset_enable
drivers/scsi/mvumi.c:674:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *reset_request @@
drivers/scsi/mvumi.c:674:9: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:674:9: sparse: got void *reset_request
>> drivers/scsi/mvumi.c:1100:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got void *arm_to_pciea_msg0 @@
drivers/scsi/mvumi.c:1100:23: sparse: expected void const [noderef] __iomem *addr
drivers/scsi/mvumi.c:1100:23: sparse: got void *arm_to_pciea_msg0
drivers/scsi/mvumi.c:1115:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *pciea_to_arm_msg1 @@
drivers/scsi/mvumi.c:1115:17: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:1115:17: sparse: got void *pciea_to_arm_msg1
drivers/scsi/mvumi.c:1116:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *pciea_to_arm_msg0 @@
drivers/scsi/mvumi.c:1116:17: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:1116:17: sparse: got void *pciea_to_arm_msg0
drivers/scsi/mvumi.c:1117:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *pciea_to_arm_drbl_reg @@
drivers/scsi/mvumi.c:1117:17: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:1117:17: sparse: got void *pciea_to_arm_drbl_reg
drivers/scsi/mvumi.c:1121:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *pciea_to_arm_msg1 @@
drivers/scsi/mvumi.c:1121:17: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:1121:17: sparse: got void *pciea_to_arm_msg1
drivers/scsi/mvumi.c:1123:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *arm_to_pciea_msg1 @@
drivers/scsi/mvumi.c:1123:17: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:1123:17: sparse: got void *arm_to_pciea_msg1
drivers/scsi/mvumi.c:1127:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *pciea_to_arm_msg0 @@
drivers/scsi/mvumi.c:1127:17: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:1127:17: sparse: got void *pciea_to_arm_msg0
drivers/scsi/mvumi.c:1128:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *pciea_to_arm_drbl_reg @@
drivers/scsi/mvumi.c:1128:17: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:1128:17: sparse: got void *pciea_to_arm_drbl_reg
drivers/scsi/mvumi.c:1168:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *pciea_to_arm_msg0 @@
drivers/scsi/mvumi.c:1168:17: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:1168:17: sparse: got void *pciea_to_arm_msg0
drivers/scsi/mvumi.c:1169:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *pciea_to_arm_drbl_reg @@
drivers/scsi/mvumi.c:1169:17: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:1169:17: sparse: got void *pciea_to_arm_drbl_reg
drivers/scsi/mvumi.c:1174:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got void *enpointa_mask_reg @@
drivers/scsi/mvumi.c:1174:23: sparse: expected void const [noderef] __iomem *addr
drivers/scsi/mvumi.c:1174:23: sparse: got void *enpointa_mask_reg
drivers/scsi/mvumi.c:1176:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *enpointa_mask_reg @@
drivers/scsi/mvumi.c:1176:17: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:1176:17: sparse: got void *enpointa_mask_reg
drivers/scsi/mvumi.c:1177:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *ib_shadow @@
drivers/scsi/mvumi.c:1177:17: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:1177:17: sparse: got void *ib_shadow
drivers/scsi/mvumi.c:1179:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *inb_aval_count_basel @@
drivers/scsi/mvumi.c:1179:17: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:1179:17: sparse: got void *inb_aval_count_basel
drivers/scsi/mvumi.c:1181:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *inb_aval_count_baseh @@
drivers/scsi/mvumi.c:1181:17: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:1181:17: sparse: got void *inb_aval_count_baseh
drivers/scsi/mvumi.c:1186:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *ob_shadow @@
drivers/scsi/mvumi.c:1186:25: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:1186:25: sparse: got void *ob_shadow
drivers/scsi/mvumi.c:1189:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *outb_copy_basel @@
drivers/scsi/mvumi.c:1189:25: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:1189:25: sparse: got void *outb_copy_basel
drivers/scsi/mvumi.c:1191:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *outb_copy_baseh @@
drivers/scsi/mvumi.c:1191:25: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:1191:25: sparse: got void *outb_copy_baseh
drivers/scsi/mvumi.c:1244:15: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got void *arm_to_pciea_msg1 @@
drivers/scsi/mvumi.c:1244:15: sparse: expected void const [noderef] __iomem *addr
drivers/scsi/mvumi.c:1244:15: sparse: got void *arm_to_pciea_msg1
drivers/scsi/mvumi.c:1247:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *pciea_to_arm_drbl_reg @@
drivers/scsi/mvumi.c:1247:25: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:1247:25: sparse: got void *pciea_to_arm_drbl_reg
drivers/scsi/mvumi.c:1256:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got void *arm_to_pciea_msg1 @@
drivers/scsi/mvumi.c:1256:23: sparse: expected void const [noderef] __iomem *addr
drivers/scsi/mvumi.c:1256:23: sparse: got void *arm_to_pciea_msg1
drivers/scsi/mvumi.c:1849:35: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] src_low_addr @@ got restricted __le32 [usertype] @@
drivers/scsi/mvumi.c:1849:35: sparse: expected unsigned int [usertype] src_low_addr
drivers/scsi/mvumi.c:1849:35: sparse: got restricted __le32 [usertype]
drivers/scsi/mvumi.c:1851:36: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] src_high_addr @@ got restricted __le32 [usertype] @@
drivers/scsi/mvumi.c:1851:36: sparse: expected unsigned int [usertype] src_high_addr
drivers/scsi/mvumi.c:1851:36: sparse: got restricted __le32 [usertype]
drivers/scsi/mvumi.c:1903:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *arm_to_pciea_mask_reg @@
drivers/scsi/mvumi.c:1903:9: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:1903:9: sparse: got void *arm_to_pciea_mask_reg
drivers/scsi/mvumi.c:1904:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got void *enpointa_mask_reg @@
drivers/scsi/mvumi.c:1904:16: sparse: expected void const [noderef] __iomem *addr
drivers/scsi/mvumi.c:1904:16: sparse: got void *enpointa_mask_reg
drivers/scsi/mvumi.c:1906:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *enpointa_mask_reg @@
drivers/scsi/mvumi.c:1906:9: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:1906:9: sparse: got void *enpointa_mask_reg
drivers/scsi/mvumi.c:1918:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *arm_to_pciea_mask_reg @@
drivers/scsi/mvumi.c:1918:9: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:1918:9: sparse: got void *arm_to_pciea_mask_reg
drivers/scsi/mvumi.c:1919:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got void *enpointa_mask_reg @@
drivers/scsi/mvumi.c:1919:16: sparse: expected void const [noderef] __iomem *addr
drivers/scsi/mvumi.c:1919:16: sparse: got void *enpointa_mask_reg
drivers/scsi/mvumi.c:1922:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *enpointa_mask_reg @@
drivers/scsi/mvumi.c:1922:9: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:1922:9: sparse: got void *enpointa_mask_reg
>> drivers/scsi/mvumi.c:1931:18: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got void *main_int_cause_reg @@
drivers/scsi/mvumi.c:1931:18: sparse: expected void const [noderef] __iomem *addr
drivers/scsi/mvumi.c:1931:18: sparse: got void *main_int_cause_reg
>> drivers/scsi/mvumi.c:1935:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got void *outb_isr_cause @@
drivers/scsi/mvumi.c:1935:23: sparse: expected void const [noderef] __iomem *addr
drivers/scsi/mvumi.c:1935:23: sparse: got void *outb_isr_cause
drivers/scsi/mvumi.c:1938:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *outb_isr_cause @@
drivers/scsi/mvumi.c:1938:33: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:1938:33: sparse: got void *outb_isr_cause
drivers/scsi/mvumi.c:1943:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *outb_isr_cause @@
drivers/scsi/mvumi.c:1943:33: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:1943:33: sparse: got void *outb_isr_cause
drivers/scsi/mvumi.c:1951:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got void *outb_isr_cause @@
drivers/scsi/mvumi.c:1951:23: sparse: expected void const [noderef] __iomem *addr
drivers/scsi/mvumi.c:1951:23: sparse: got void *outb_isr_cause
drivers/scsi/mvumi.c:1953:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *outb_isr_cause @@
drivers/scsi/mvumi.c:1953:25: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:1953:25: sparse: got void *outb_isr_cause
drivers/scsi/mvumi.c:1956:30: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got void *arm_to_pciea_drbl_reg @@
drivers/scsi/mvumi.c:1956:30: sparse: expected void const [noderef] __iomem *addr
drivers/scsi/mvumi.c:1956:30: sparse: got void *arm_to_pciea_drbl_reg
drivers/scsi/mvumi.c:1958:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *arm_to_pciea_drbl_reg @@
drivers/scsi/mvumi.c:1958:25: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:1958:25: sparse: got void *arm_to_pciea_drbl_reg
drivers/scsi/mvumi.c:1975:18: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem *addr @@ got void *arm_to_pciea_drbl_reg @@
drivers/scsi/mvumi.c:1975:18: sparse: expected void const [noderef] __iomem *addr
drivers/scsi/mvumi.c:1975:18: sparse: got void *arm_to_pciea_drbl_reg
drivers/scsi/mvumi.c:1977:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *arm_to_pciea_drbl_reg @@
drivers/scsi/mvumi.c:1977:17: sparse: expected void [noderef] __iomem *addr
drivers/scsi/mvumi.c:1977:17: sparse: got void *arm_to_pciea_drbl_reg

vim +256 drivers/gpu/drm/ttm/ttm_bo_util.c

82c5da6bf8b55a Jerome Glisse 2010-04-09 200
dcbff15a601b54 Rashika Kheria 2014-01-06 201 static int ttm_mem_reg_ioremap(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem,
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 202 void **virtual)
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 203 {
eba67093f53532 Thomas Hellstrom 2010-11-11 204 struct ttm_mem_type_manager *man = &bdev->man[mem->mem_type];
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 205 int ret;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 206 void *addr;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 207
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 208 *virtual = NULL;
eba67093f53532 Thomas Hellstrom 2010-11-11 209 (void) ttm_mem_io_lock(man, false);
82c5da6bf8b55a Jerome Glisse 2010-04-09 210 ret = ttm_mem_io_reserve(bdev, mem);
eba67093f53532 Thomas Hellstrom 2010-11-11 211 ttm_mem_io_unlock(man);
9e51159c14c29e Jerome Glisse 2010-05-05 212 if (ret || !mem->bus.is_iomem)
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 213 return ret;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 214
82c5da6bf8b55a Jerome Glisse 2010-04-09 215 if (mem->bus.addr) {
82c5da6bf8b55a Jerome Glisse 2010-04-09 216 addr = mem->bus.addr;
82c5da6bf8b55a Jerome Glisse 2010-04-09 217 } else {
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 218 if (mem->placement & TTM_PL_FLAG_WC)
82c5da6bf8b55a Jerome Glisse 2010-04-09 @219 addr = ioremap_wc(mem->bus.base + mem->bus.offset, mem->bus.size);
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 220 else
4bdc0d676a6431 Christoph Hellwig 2020-01-06 221 addr = ioremap(mem->bus.base + mem->bus.offset, mem->bus.size);
82c5da6bf8b55a Jerome Glisse 2010-04-09 222 if (!addr) {
eba67093f53532 Thomas Hellstrom 2010-11-11 223 (void) ttm_mem_io_lock(man, false);
82c5da6bf8b55a Jerome Glisse 2010-04-09 224 ttm_mem_io_free(bdev, mem);
eba67093f53532 Thomas Hellstrom 2010-11-11 225 ttm_mem_io_unlock(man);
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 226 return -ENOMEM;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 227 }
82c5da6bf8b55a Jerome Glisse 2010-04-09 228 }
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 229 *virtual = addr;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 230 return 0;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 231 }
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 232
dcbff15a601b54 Rashika Kheria 2014-01-06 233 static void ttm_mem_reg_iounmap(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem,
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 234 void *virtual)
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 235 {
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 236 struct ttm_mem_type_manager *man;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 237
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 238 man = &bdev->man[mem->mem_type];
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 239
0c321c79627189 Jerome Glisse 2010-04-07 240 if (virtual && mem->bus.addr == NULL)
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 241 iounmap(virtual);
eba67093f53532 Thomas Hellstrom 2010-11-11 242 (void) ttm_mem_io_lock(man, false);
82c5da6bf8b55a Jerome Glisse 2010-04-09 243 ttm_mem_io_free(bdev, mem);
eba67093f53532 Thomas Hellstrom 2010-11-11 244 ttm_mem_io_unlock(man);
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 245 }
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 246
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 247 static int ttm_copy_io_page(void *dst, void *src, unsigned long page)
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 248 {
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 249 uint32_t *dstP =
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 250 (uint32_t *) ((unsigned long)dst + (page << PAGE_SHIFT));
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 251 uint32_t *srcP =
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 252 (uint32_t *) ((unsigned long)src + (page << PAGE_SHIFT));
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 253
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 254 int i;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 255 for (i = 0; i < PAGE_SIZE / sizeof(uint32_t); ++i)
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 @256 iowrite32(ioread32(srcP++), dstP++);
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 257 return 0;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 258 }
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 259

:::::: The code at line 256 was first introduced by commit
:::::: ba4e7d973dd09b66912ac4c0856add8b0703a997 drm: Add the TTM GPU memory manager subsystem.

:::::: TO: Thomas Hellstrom <thellstrom@xxxxxxxxxx>
:::::: CC: Dave Airlie <airlied@xxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip