All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/iommu/intel/dmar.c:1506 dmar_disable_qi() warn: this loop depends on readl() succeeding
@ 2020-12-12 22:13 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-12-12 22:13 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 5072 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Joerg Roedel <jroedel@suse.de>
CC: Jerry Snitselaar <jsnitsel@redhat.com>
CC: Lu Baolu <baolu.lu@linux.intel.com>

Hi Joerg,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   6bff9bb8a292668e7da3e740394b061e5201f683
commit: 672cf6df9b8a3a6d70a6a5c30397f76fa40d3178 iommu/vt-d: Move Intel IOMMU driver into subdirectory
date:   6 months ago
:::::: branch date: 76 minutes ago
:::::: commit date: 6 months ago
config: i386-randconfig-m021-20201213 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/iommu/intel/dmar.c:1506 dmar_disable_qi() warn: this loop depends on readl() succeeding
drivers/iommu/intel/dmar.c:1506 dmar_disable_qi() warn: this loop depends on readl() succeeding
drivers/iommu/intel/dmar.c:1872 dmar_fault() warn: this loop depends on readl() succeeding
drivers/iommu/intel/dmar.c:2023 dmar_detect_dsm() warn: should '1 << func' be a 64 bit type?

vim +1506 drivers/iommu/intel/dmar.c

61a06a16e36d83 drivers/iommu/dmar.c Jacob Pan       2020-05-16  1476  
eba67e5da6e971 drivers/pci/dmar.c   Suresh Siddha   2009-03-16  1477  /*
eba67e5da6e971 drivers/pci/dmar.c   Suresh Siddha   2009-03-16  1478   * Disable Queued Invalidation interface.
eba67e5da6e971 drivers/pci/dmar.c   Suresh Siddha   2009-03-16  1479   */
eba67e5da6e971 drivers/pci/dmar.c   Suresh Siddha   2009-03-16  1480  void dmar_disable_qi(struct intel_iommu *iommu)
eba67e5da6e971 drivers/pci/dmar.c   Suresh Siddha   2009-03-16  1481  {
eba67e5da6e971 drivers/pci/dmar.c   Suresh Siddha   2009-03-16  1482  	unsigned long flags;
eba67e5da6e971 drivers/pci/dmar.c   Suresh Siddha   2009-03-16  1483  	u32 sts;
eba67e5da6e971 drivers/pci/dmar.c   Suresh Siddha   2009-03-16  1484  	cycles_t start_time = get_cycles();
eba67e5da6e971 drivers/pci/dmar.c   Suresh Siddha   2009-03-16  1485  
eba67e5da6e971 drivers/pci/dmar.c   Suresh Siddha   2009-03-16  1486  	if (!ecap_qis(iommu->ecap))
eba67e5da6e971 drivers/pci/dmar.c   Suresh Siddha   2009-03-16  1487  		return;
eba67e5da6e971 drivers/pci/dmar.c   Suresh Siddha   2009-03-16  1488  
1f5b3c3fd2d73d drivers/iommu/dmar.c Thomas Gleixner 2011-07-19  1489  	raw_spin_lock_irqsave(&iommu->register_lock, flags);
eba67e5da6e971 drivers/pci/dmar.c   Suresh Siddha   2009-03-16  1490  
fda3bec12d0979 drivers/iommu/dmar.c CQ Tang         2016-01-13  1491  	sts =  readl(iommu->reg + DMAR_GSTS_REG);
eba67e5da6e971 drivers/pci/dmar.c   Suresh Siddha   2009-03-16  1492  	if (!(sts & DMA_GSTS_QIES))
eba67e5da6e971 drivers/pci/dmar.c   Suresh Siddha   2009-03-16  1493  		goto end;
eba67e5da6e971 drivers/pci/dmar.c   Suresh Siddha   2009-03-16  1494  
eba67e5da6e971 drivers/pci/dmar.c   Suresh Siddha   2009-03-16  1495  	/*
eba67e5da6e971 drivers/pci/dmar.c   Suresh Siddha   2009-03-16  1496  	 * Give a chance to HW to complete the pending invalidation requests.
eba67e5da6e971 drivers/pci/dmar.c   Suresh Siddha   2009-03-16  1497  	 */
eba67e5da6e971 drivers/pci/dmar.c   Suresh Siddha   2009-03-16  1498  	while ((readl(iommu->reg + DMAR_IQT_REG) !=
eba67e5da6e971 drivers/pci/dmar.c   Suresh Siddha   2009-03-16  1499  		readl(iommu->reg + DMAR_IQH_REG)) &&
eba67e5da6e971 drivers/pci/dmar.c   Suresh Siddha   2009-03-16  1500  		(DMAR_OPERATION_TIMEOUT > (get_cycles() - start_time)))
eba67e5da6e971 drivers/pci/dmar.c   Suresh Siddha   2009-03-16  1501  		cpu_relax();
eba67e5da6e971 drivers/pci/dmar.c   Suresh Siddha   2009-03-16  1502  
eba67e5da6e971 drivers/pci/dmar.c   Suresh Siddha   2009-03-16  1503  	iommu->gcmd &= ~DMA_GCMD_QIE;
eba67e5da6e971 drivers/pci/dmar.c   Suresh Siddha   2009-03-16  1504  	writel(iommu->gcmd, iommu->reg + DMAR_GCMD_REG);
eba67e5da6e971 drivers/pci/dmar.c   Suresh Siddha   2009-03-16  1505  
eba67e5da6e971 drivers/pci/dmar.c   Suresh Siddha   2009-03-16 @1506  	IOMMU_WAIT_OP(iommu, DMAR_GSTS_REG, readl,
eba67e5da6e971 drivers/pci/dmar.c   Suresh Siddha   2009-03-16  1507  		      !(sts & DMA_GSTS_QIES), sts);
eba67e5da6e971 drivers/pci/dmar.c   Suresh Siddha   2009-03-16  1508  end:
1f5b3c3fd2d73d drivers/iommu/dmar.c Thomas Gleixner 2011-07-19  1509  	raw_spin_unlock_irqrestore(&iommu->register_lock, flags);
eba67e5da6e971 drivers/pci/dmar.c   Suresh Siddha   2009-03-16  1510  }
eba67e5da6e971 drivers/pci/dmar.c   Suresh Siddha   2009-03-16  1511  

:::::: The code at line 1506 was first introduced by commit
:::::: eba67e5da6e971993b2899d2cdf459ce77d3dbc5 x86, dmar: routines for disabling queued invalidation and intr remapping

:::::: TO: Suresh Siddha <suresh.b.siddha@intel.com>
:::::: CC: H. Peter Anvin <hpa@linux.intel.com>

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33532 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-12 22:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-12 22:13 drivers/iommu/intel/dmar.c:1506 dmar_disable_qi() warn: this loop depends on readl() succeeding kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.