Messages in this thread Patch in this message | | | Date | Mon, 24 Dec 2012 16:59:13 +0800 | Subject | Clear tags in dmar.c | From | "Li, Zhen-Hua" <> |
| |
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; }
| |