[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202203180421.pQJyHnCm-lkp@intel.com>
Date: Fri, 18 Mar 2022 04:06:44 +0800
From: kernel test robot <lkp@...el.com>
To: Yi Liu <yi.l.liu@...el.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [luxis1999-iommufd:iommufd-v5.17-rc6-wip 41/41]
drivers/iommu/iommufd/device.c:136:77: warning: cast from pointer to integer
of different size
tree: https://github.com/luxis1999/iommufd iommufd-v5.17-rc6-wip
head: d883a7e5a78fb9f4d6fc85a0845f95c6613aaade
commit: d883a7e5a78fb9f4d6fc85a0845f95c6613aaade [41/41] Check the below call trace
config: i386-randconfig-a003 (https://download.01.org/0day-ci/archive/20220318/202203180421.pQJyHnCm-lkp@intel.com/config)
compiler: gcc-9 (Ubuntu 9.4.0-1ubuntu1~20.04) 9.4.0
reproduce (this is a W=1 build):
# https://github.com/luxis1999/iommufd/commit/d883a7e5a78fb9f4d6fc85a0845f95c6613aaade
git remote add luxis1999-iommufd https://github.com/luxis1999/iommufd
git fetch --no-tags luxis1999-iommufd iommufd-v5.17-rc6-wip
git checkout d883a7e5a78fb9f4d6fc85a0845f95c6613aaade
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/iommu/iommufd/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/kernel.h:29,
from arch/x86/include/asm/percpu.h:27,
from arch/x86/include/asm/current.h:6,
from include/linux/sched.h:12,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from include/linux/iommufd.h:12,
from drivers/iommu/iommufd/device.c:4:
drivers/iommu/iommufd/device.c: In function 'iommufd_device_setup_msi':
>> drivers/iommu/iommufd/device.c:136:77: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
136 | printk("%s, dev: %s, hwpt->domain: %llx\n", __func__, dev_name(idev->dev), (unsigned long long)hwpt->domain);
| ^
include/linux/printk.h:418:19: note: in definition of macro 'printk_index_wrap'
418 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~~~~~~~~
drivers/iommu/iommufd/device.c:136:2: note: in expansion of macro 'printk'
136 | printk("%s, dev: %s, hwpt->domain: %llx\n", __func__, dev_name(idev->dev), (unsigned long long)hwpt->domain);
| ^~~~~~
vim +136 drivers/iommu/iommufd/device.c
130
131 static int iommufd_device_setup_msi(struct iommufd_device *idev,
132 struct iommufd_hw_pagetable *hwpt,
133 phys_addr_t sw_msi_start,
134 unsigned int flags)
135 {
> 136 printk("%s, dev: %s, hwpt->domain: %llx\n", __func__, dev_name(idev->dev), (unsigned long long)hwpt->domain);
137 /*
138 * IOMMU_CAP_INTR_REMAP means that the platform is isolating MSI,
139 * nothing further to do.
140 */
141 if (iommu_capable(idev->dev->bus, IOMMU_CAP_INTR_REMAP))
142 return 0;
143
144 printk("%s %d\n", __func__, __LINE__);
145 /*
146 * On ARM systems that set the global IRQ_DOMAIN_FLAG_MSI_REMAP every
147 * allocated iommu_domain will block interrupts by default and this
148 * special flow is needed to turn them back on.
149 */
150 if (irq_domain_check_msi_remap()) {
151 if (WARN_ON(!sw_msi_start))
152 return -EPERM;
153 return iommu_get_msi_cookie(hwpt->domain, sw_msi_start);
154 }
155
156 /*
157 * Otherwise the platform has a MSI window that is not isolated. For
158 * historical compat with VFIO allow a module parameter to ignore the
159 * insecurity.
160 */
161 if (!(flags & IOMMUFD_ATTACH_FLAGS_ALLOW_UNSAFE_INTERRUPT))
162 return -EPERM;
163 return 0;
164 }
165
---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Powered by blists - more mailing lists