* [linux-next:master 8183/8750] drivers/iommu/intel/iommu.c:5643:27: warning: variable 'last_pfn' set but not used
@ 2020-11-26 19:42 kernel test robot
2020-11-26 21:04 ` Will Deacon
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2020-11-26 19:42 UTC (permalink / raw)
To: Tom Murphy
Cc: kbuild-all, Linux Memory Management List, Will Deacon, Lu Baolu
[-- Attachment #1: Type: text/plain, Size: 2415 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 6147c83fd749d19a0d3ccc2f64d12138ab010b47
commit: 2a2b8eaa5b25668a6f717f94b55f4e3aaf87629d [8183/8750] iommu: Handle freelists when using deferred flushing in iommu drivers
config: ia64-randconfig-r004-20201127 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
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
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=2a2b8eaa5b25668a6f717f94b55f4e3aaf87629d
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 2a2b8eaa5b25668a6f717f94b55f4e3aaf87629d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/iommu/intel/iommu.c: In function 'intel_iommu_tlb_sync':
>> drivers/iommu/intel/iommu.c:5643:27: warning: variable 'last_pfn' set but not used [-Wunused-but-set-variable]
5643 | unsigned long start_pfn, last_pfn;
| ^~~~~~~~
vim +/last_pfn +5643 drivers/iommu/intel/iommu.c
5636
5637 static void intel_iommu_tlb_sync(struct iommu_domain *domain,
5638 struct iommu_iotlb_gather *gather)
5639 {
5640 struct dmar_domain *dmar_domain = to_dmar_domain(domain);
5641 unsigned long iova_pfn = IOVA_PFN(gather->start);
5642 size_t size = gather->end - gather->start;
> 5643 unsigned long start_pfn, last_pfn;
5644 unsigned long nrpages;
5645 int iommu_id;
5646
5647 nrpages = aligned_nrpages(gather->start, size);
5648 start_pfn = mm_to_dma_pfn(iova_pfn);
5649 last_pfn = start_pfn + nrpages - 1;
5650
5651 for_each_domain_iommu(iommu_id, dmar_domain)
5652 iommu_flush_iotlb_psi(g_iommus[iommu_id], dmar_domain,
5653 start_pfn, nrpages, !gather->freelist, 0);
5654
5655 dma_free_pagelist(gather->freelist);
5656 }
5657
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 24143 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-next:master 8183/8750] drivers/iommu/intel/iommu.c:5643:27: warning: variable 'last_pfn' set but not used
2020-11-26 19:42 [linux-next:master 8183/8750] drivers/iommu/intel/iommu.c:5643:27: warning: variable 'last_pfn' set but not used kernel test robot
@ 2020-11-26 21:04 ` Will Deacon
2020-11-27 1:33 ` Lu Baolu
0 siblings, 1 reply; 3+ messages in thread
From: Will Deacon @ 2020-11-26 21:04 UTC (permalink / raw)
To: kernel test robot
Cc: Tom Murphy, kbuild-all, Linux Memory Management List, Lu Baolu
On Fri, Nov 27, 2020 at 03:42:40AM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: 6147c83fd749d19a0d3ccc2f64d12138ab010b47
> commit: 2a2b8eaa5b25668a6f717f94b55f4e3aaf87629d [8183/8750] iommu: Handle freelists when using deferred flushing in iommu drivers
> config: ia64-randconfig-r004-20201127 (attached as .config)
> compiler: ia64-linux-gcc (GCC) 9.3.0
> 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
> # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=2a2b8eaa5b25668a6f717f94b55f4e3aaf87629d
> git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> git fetch --no-tags linux-next master
> git checkout 2a2b8eaa5b25668a6f717f94b55f4e3aaf87629d
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>):
>
> drivers/iommu/intel/iommu.c: In function 'intel_iommu_tlb_sync':
> >> drivers/iommu/intel/iommu.c:5643:27: warning: variable 'last_pfn' set but not used [-Wunused-but-set-variable]
> 5643 | unsigned long start_pfn, last_pfn;
> | ^~~~~~~~
Looks like we can just drop the 'last_pfn' variable altogether, since
iommu_flush_iotlb_psi() takes start and size, rather than start and end.
Baolu -- please can you send a patch on top of for-next/iommu/vt-d?
Cheers,
Will
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-next:master 8183/8750] drivers/iommu/intel/iommu.c:5643:27: warning: variable 'last_pfn' set but not used
2020-11-26 21:04 ` Will Deacon
@ 2020-11-27 1:33 ` Lu Baolu
0 siblings, 0 replies; 3+ messages in thread
From: Lu Baolu @ 2020-11-27 1:33 UTC (permalink / raw)
To: Will Deacon, kernel test robot
Cc: baolu.lu, Tom Murphy, kbuild-all, Linux Memory Management List
Hi Will,
On 11/27/20 5:04 AM, Will Deacon wrote:
> On Fri, Nov 27, 2020 at 03:42:40AM +0800, kernel test robot wrote:
>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
>> head: 6147c83fd749d19a0d3ccc2f64d12138ab010b47
>> commit: 2a2b8eaa5b25668a6f717f94b55f4e3aaf87629d [8183/8750] iommu: Handle freelists when using deferred flushing in iommu drivers
>> config: ia64-randconfig-r004-20201127 (attached as .config)
>> compiler: ia64-linux-gcc (GCC) 9.3.0
>> 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
>> # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=2a2b8eaa5b25668a6f717f94b55f4e3aaf87629d
>> git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
>> git fetch --no-tags linux-next master
>> git checkout 2a2b8eaa5b25668a6f717f94b55f4e3aaf87629d
>> # save the attached .config to linux build tree
>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
>>
>> If you fix the issue, kindly add following tag as appropriate
>> Reported-by: kernel test robot <lkp@intel.com>
>>
>> All warnings (new ones prefixed by >>):
>>
>> drivers/iommu/intel/iommu.c: In function 'intel_iommu_tlb_sync':
>>>> drivers/iommu/intel/iommu.c:5643:27: warning: variable 'last_pfn' set but not used [-Wunused-but-set-variable]
>> 5643 | unsigned long start_pfn, last_pfn;
>> | ^~~~~~~~
>
>
> Looks like we can just drop the 'last_pfn' variable altogether, since
> iommu_flush_iotlb_psi() takes start and size, rather than start and end.
>
> Baolu -- please can you send a patch on top of for-next/iommu/vt-d?
Sure!
Best regards,
baolu
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-27 1:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-26 19:42 [linux-next:master 8183/8750] drivers/iommu/intel/iommu.c:5643:27: warning: variable 'last_pfn' set but not used kernel test robot
2020-11-26 21:04 ` Will Deacon
2020-11-27 1:33 ` Lu Baolu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).