Clear tags in dmar.c

From: Li, Zhen-Hua
Date: Mon Dec 24 2012 - 03:59:02 EST


In dmar.c: qi_check_fault, I think the tags should be clear when
finished processing.
See this patch:

--- drivers/iommu/dmar.c.orig 2012-12-25 00:56:16.000000000 +0800
+++ drivers/iommu/dmar.c.new 2012-12-25 00:56:37.000000000 +0800
@@ -759,7 +759,7 @@ static int qi_check_fault(struct intel_i
sizeof(struct qi_desc));
__iommu_flush_cache(iommu, &qi->desc[index],
sizeof(struct qi_desc));
- writel(DMA_FSTS_IQE, iommu->reg + DMAR_FSTS_REG);
+ writel(~DMA_FSTS_IQE, iommu->reg + DMAR_FSTS_REG);
return -EINVAL;
}
}
@@ -775,7 +775,7 @@ static int qi_check_fault(struct intel_i
tail = readl(iommu->reg + DMAR_IQT_REG);
tail = ((tail >> DMAR_IQ_SHIFT) - 1 + QI_LENGTH) % QI_LENGTH;

- writel(DMA_FSTS_ITE, iommu->reg + DMAR_FSTS_REG);
+ writel(~DMA_FSTS_ITE, iommu->reg + DMAR_FSTS_REG);

do {
if (qi->desc_status[head] == QI_IN_USE)
@@ -788,7 +788,7 @@ static int qi_check_fault(struct intel_i
}

if (fault & DMA_FSTS_ICE)
- writel(DMA_FSTS_ICE, iommu->reg + DMAR_FSTS_REG);
+ writel(~DMA_FSTS_ICE, iommu->reg + DMAR_FSTS_REG);

return 0;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/