* [asahilinux:bits/020-t6000-dart 6/21] drivers/iommu/apple-dart.c:610:34: warning: implicit conversion from 'unsigned long long' to 'dma_addr_t' (aka 'unsigned int') changes value from 18446744073709551615 to 4294967295
@ 2023-02-06 0:58 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-02-06 0:58 UTC (permalink / raw)
To: Hector Martin; +Cc: llvm, oe-kbuild-all
tree: https://github.com/AsahiLinux/linux bits/020-t6000-dart
head: 05458bcb879b99768bb4621c212651a1316a4e95
commit: da75d5ce709f288f6e4902dcf6fe5d7113995bdd [6/21] iommu: dart: Add t8110 DART support
config: arm-randconfig-r046-20230206 (https://download.01.org/0day-ci/archive/20230206/202302060829.LqIe1phI-lkp@intel.com/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 4196ca3278f78c6e19246e54ab0ecb364e37d66a)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/AsahiLinux/linux/commit/da75d5ce709f288f6e4902dcf6fe5d7113995bdd
git remote add asahilinux https://github.com/AsahiLinux/linux
git fetch --no-tags asahilinux bits/020-t6000-dart
git checkout da75d5ce709f288f6e4902dcf6fe5d7113995bdd
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/iommu/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/iommu/apple-dart.c:610:34: warning: implicit conversion from 'unsigned long long' to 'dma_addr_t' (aka 'unsigned int') changes value from 18446744073709551615 to 4294967295 [-Wconstant-conversion]
domain->geometry.aperture_end = DMA_BIT_MASK(dart->ias);
~ ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:76:40: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^~~~~
1 warning generated.
vim +610 drivers/iommu/apple-dart.c
571
572 static int apple_dart_finalize_domain(struct iommu_domain *domain,
573 struct apple_dart_master_cfg *cfg)
574 {
575 struct apple_dart_domain *dart_domain = to_dart_domain(domain);
576 struct apple_dart *dart = cfg->stream_maps[0].dart;
577 struct io_pgtable_cfg pgtbl_cfg;
578 int ret = 0;
579 int i, j;
580
581 mutex_lock(&dart_domain->init_lock);
582
583 if (dart_domain->finalized)
584 goto done;
585
586 for (i = 0; i < MAX_DARTS_PER_DEVICE; ++i) {
587 dart_domain->stream_maps[i].dart = cfg->stream_maps[i].dart;
588 for (j = 0; j < BITS_TO_LONGS(dart->num_streams); j++)
589 atomic_long_set(&dart_domain->stream_maps[i].sidmap[j],
590 cfg->stream_maps[i].sidmap[j]);
591 }
592
593 pgtbl_cfg = (struct io_pgtable_cfg){
594 .pgsize_bitmap = dart->pgsize,
595 .ias = dart->ias,
596 .oas = dart->oas,
597 .coherent_walk = 1,
598 .iommu_dev = dart->dev,
599 };
600
601 dart_domain->pgtbl_ops =
602 alloc_io_pgtable_ops(dart->hw->fmt, &pgtbl_cfg, domain);
603 if (!dart_domain->pgtbl_ops) {
604 ret = -ENOMEM;
605 goto done;
606 }
607
608 domain->pgsize_bitmap = pgtbl_cfg.pgsize_bitmap;
609 domain->geometry.aperture_start = 0;
> 610 domain->geometry.aperture_end = DMA_BIT_MASK(dart->ias);
611 domain->geometry.force_aperture = true;
612
613 dart_domain->finalized = true;
614
615 done:
616 mutex_unlock(&dart_domain->init_lock);
617 return ret;
618 }
619
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-02-06 0:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-06 0:58 [asahilinux:bits/020-t6000-dart 6/21] drivers/iommu/apple-dart.c:610:34: warning: implicit conversion from 'unsigned long long' to 'dma_addr_t' (aka 'unsigned int') changes value from 18446744073709551615 to 4294967295 kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox