summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2008-12-17 15:06:01 +0100
committerJoerg Roedel <joerg.roedel@amd.com>2008-12-17 15:06:01 +0100
commitcf558d25e5c9f70fa0279c9b7b8b4aed7cae9bd4 (patch)
tree2542605dbecb68368600dbb02cfa617a508202b5 /arch
parent83fd5cc6481c6b7fa8b45f8a7e0aa7120213430b (diff)
downloadop-kernel-dev-cf558d25e5c9f70fa0279c9b7b8b4aed7cae9bd4.zip
op-kernel-dev-cf558d25e5c9f70fa0279c9b7b8b4aed7cae9bd4.tar.gz
AMD IOMMU: set cmd buffer pointers to zero manually
Impact: set cmd buffer head and tail pointers to zero in case nobody else did Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/amd_iommu_init.c4
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 c90a15e..c6cc228 100644
--- a/arch/x86/kernel/amd_iommu_init.c
+++ b/arch/x86/kernel/amd_iommu_init.c
@@ -427,6 +427,10 @@ static u8 * __init alloc_command_buffer(struct amd_iommu *iommu)
memcpy_toio(iommu->mmio_base + MMIO_CMD_BUF_OFFSET,
&entry, sizeof(entry));
+ /* set head and tail to zero manually */
+ writel(0x00, iommu->mmio_base + MMIO_CMD_HEAD_OFFSET);
+ writel(0x00, iommu->mmio_base + MMIO_CMD_TAIL_OFFSET);
+
iommu_feature_enable(iommu, CONTROL_CMDBUF_EN);
return cmd_buf;
OpenPOWER on IntegriCloud