lkml.org 
[lkml]   [2018]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 08/23] iommu/vt-d: support flushing more translation cache types
Hi Jacob,

I love your patch! Perhaps something to improve:

[auto build test WARNING on iommu/next]
[also build test WARNING on v4.17-rc5 next-20180516]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Jacob-Pan/IOMMU-and-VT-d-driver-support-for-Shared-Virtual-Address-SVA/20180512-114854
base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: x86_64-rhel-7.2 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

All warnings (new ones prefixed by >>):

drivers/iommu/dmar.c: In function 'qi_flush_dev_eiotlb':
>> drivers/iommu/dmar.c:1382:12: warning: 'desc.high' is used uninitialized in this function [-Wuninitialized]
desc.high |= QI_DEV_EIOTLB_GLOB(granu);
^~

vim +1382 drivers/iommu/dmar.c

1374
1375 void qi_flush_dev_eiotlb(struct intel_iommu *iommu, u16 sid,
1376 u32 pasid, u16 qdep, u64 addr, unsigned size, u64 granu)
1377 {
1378 struct qi_desc desc;
1379
1380 desc.low = QI_DEV_EIOTLB_PASID(pasid) | QI_DEV_EIOTLB_SID(sid) |
1381 QI_DEV_EIOTLB_QDEP(qdep) | QI_DEIOTLB_TYPE;
> 1382 desc.high |= QI_DEV_EIOTLB_GLOB(granu);
1383
1384 /* If S bit is 0, we only flush a single page. If S bit is set,
1385 * The least significant zero bit indicates the size. VT-d spec
1386 * 6.5.2.6
1387 */
1388 if (!size)
1389 desc.high = QI_DEV_EIOTLB_ADDR(addr) & ~QI_DEV_EIOTLB_SIZE;
1390 else {
1391 unsigned long mask = 1UL << (VTD_PAGE_SHIFT + size);
1392
1393 desc.high = QI_DEV_EIOTLB_ADDR(addr & ~mask) | QI_DEV_EIOTLB_SIZE;
1394 }
1395 qi_submit_sync(&desc, iommu);
1396 }
1397

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2018-05-17 10:46    [W:0.907 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site