Commit 09067207 authored by Joerg Roedel's avatar Joerg Roedel

amd-iommu: set event buffer head and tail to 0 manually

These registers may contain values from previous kernels. So reset them
to known values before enable the event buffer again.
Signed-off-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
parent a8c485bb
...@@ -486,6 +486,10 @@ static void iommu_enable_event_buffer(struct amd_iommu *iommu) ...@@ -486,6 +486,10 @@ static void iommu_enable_event_buffer(struct amd_iommu *iommu)
memcpy_toio(iommu->mmio_base + MMIO_EVT_BUF_OFFSET, memcpy_toio(iommu->mmio_base + MMIO_EVT_BUF_OFFSET,
&entry, sizeof(entry)); &entry, sizeof(entry));
/* set head and tail to zero manually */
writel(0x00, iommu->mmio_base + MMIO_EVT_HEAD_OFFSET);
writel(0x00, iommu->mmio_base + MMIO_EVT_TAIL_OFFSET);
iommu_feature_enable(iommu, CONTROL_EVT_LOG_EN); iommu_feature_enable(iommu, CONTROL_EVT_LOG_EN);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment