diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2009-06-15 10:06:48 -0400 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2009-06-15 10:06:48 -0400 |
commit | 09067207f6eacb7f00c8f7f0623c3696083ce042 (patch) | |
tree | 96a9901b6f7164b773c89c65326bbc39ce46fa2d | |
parent | a8c485bb6857811807d42f9fd1fde2f5f89cc5c9 (diff) |
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: Joerg Roedel <joerg.roedel@amd.com>
-rw-r--r-- | arch/x86/kernel/amd_iommu_init.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c index 48a79b9b2f9e..068a3569f837 100644 --- a/arch/x86/kernel/amd_iommu_init.c +++ b/arch/x86/kernel/amd_iommu_init.c | |||
@@ -486,6 +486,10 @@ static void iommu_enable_event_buffer(struct amd_iommu *iommu) | |||
486 | memcpy_toio(iommu->mmio_base + MMIO_EVT_BUF_OFFSET, | 486 | memcpy_toio(iommu->mmio_base + MMIO_EVT_BUF_OFFSET, |
487 | &entry, sizeof(entry)); | 487 | &entry, sizeof(entry)); |
488 | 488 | ||
489 | /* set head and tail to zero manually */ | ||
490 | writel(0x00, iommu->mmio_base + MMIO_EVT_HEAD_OFFSET); | ||
491 | writel(0x00, iommu->mmio_base + MMIO_EVT_TAIL_OFFSET); | ||
492 | |||
489 | iommu_feature_enable(iommu, CONTROL_EVT_LOG_EN); | 493 | iommu_feature_enable(iommu, CONTROL_EVT_LOG_EN); |
490 | } | 494 | } |
491 | 495 | ||