]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
AMD IOMMU: set cmd buffer pointers to zero manually
authorJoerg Roedel <joerg.roedel@amd.com>
Wed, 17 Dec 2008 14:06:01 +0000 (15:06 +0100)
committerJoerg Roedel <joerg.roedel@amd.com>
Wed, 17 Dec 2008 14:06:01 +0000 (15:06 +0100)
Impact: set cmd buffer head and tail pointers to zero in case nobody else did

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
arch/x86/kernel/amd_iommu_init.c

index c90a15eba5c5e42956d872527ff25dbfdc941ae6..c6cc22815d35f232dd21fae7d2718a3c161b373c 100644 (file)
@@ -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;