]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'dwmw2-iommu/master'
authorStephen Rothwell <sfr@canb.auug.org.au>
Thu, 11 Feb 2016 01:44:21 +0000 (12:44 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 11 Feb 2016 01:44:21 +0000 (12:44 +1100)
1  2 
drivers/iommu/dmar.c
drivers/iommu/intel_irq_remapping.c

diff --combined drivers/iommu/dmar.c
index 62a400c5ba0614fde00d18ad2207b430d99433ee,55a19e49205bcab9ad05c6d9bae05a4a6f02721a..fb092f3f11cb3e32ec8462925587e9778f862a25
@@@ -1063,19 -1063,13 +1063,19 @@@ static int alloc_iommu(struct dmar_drhd
  
        raw_spin_lock_init(&iommu->register_lock);
  
 -      drhd->iommu = iommu;
 -
 -      if (intel_iommu_enabled)
 +      if (intel_iommu_enabled) {
                iommu->iommu_dev = iommu_device_create(NULL, iommu,
                                                       intel_iommu_groups,
                                                       "%s", iommu->name);
  
 +              if (IS_ERR(iommu->iommu_dev)) {
 +                      err = PTR_ERR(iommu->iommu_dev);
 +                      goto err_unmap;
 +              }
 +      }
 +
 +      drhd->iommu = iommu;
 +
        return 0;
  
  err_unmap:
@@@ -1353,7 -1347,7 +1353,7 @@@ void dmar_disable_qi(struct intel_iomm
  
        raw_spin_lock_irqsave(&iommu->register_lock, flags);
  
-       sts =  dmar_readq(iommu->reg + DMAR_GSTS_REG);
+       sts =  readl(iommu->reg + DMAR_GSTS_REG);
        if (!(sts & DMA_GSTS_QIES))
                goto end;
  
index c12ba4516df25b7201731b44ef4a175c78f2d0e0,e9b241b1c9dd8469aedaa51fda108c6b1e338450..ac596928f6b40af32e9c44ecf388ebf7ed4b10ed
@@@ -629,7 -629,7 +629,7 @@@ static void iommu_disable_irq_remapping
  
        raw_spin_lock_irqsave(&iommu->register_lock, flags);
  
-       sts = dmar_readq(iommu->reg + DMAR_GSTS_REG);
+       sts = readl(iommu->reg + DMAR_GSTS_REG);
        if (!(sts & DMA_GSTS_IRES))
                goto end;
  
@@@ -753,7 -753,7 +753,7 @@@ static inline void set_irq_posting_cap(
                 * should have X86_FEATURE_CX16 support, this has been confirmed
                 * with Intel hardware guys.
                 */
 -              if ( cpu_has_cx16 )
 +              if (boot_cpu_has(X86_FEATURE_CX16))
                        intel_irq_remap_ops.capability |= 1 << IRQ_POSTING_CAP;
  
                for_each_iommu(iommu, drhd)