diff options
Diffstat (limited to 'arch/x86/kernel/amd_iommu_init.c')
-rw-r--r-- | arch/x86/kernel/amd_iommu_init.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c index 1188b98e27e..c625800c55c 100644 --- a/arch/x86/kernel/amd_iommu_init.c +++ b/arch/x86/kernel/amd_iommu_init.c | |||
@@ -428,6 +428,10 @@ static u8 * __init alloc_command_buffer(struct amd_iommu *iommu) | |||
428 | memcpy_toio(iommu->mmio_base + MMIO_CMD_BUF_OFFSET, | 428 | memcpy_toio(iommu->mmio_base + MMIO_CMD_BUF_OFFSET, |
429 | &entry, sizeof(entry)); | 429 | &entry, sizeof(entry)); |
430 | 430 | ||
431 | /* set head and tail to zero manually */ | ||
432 | writel(0x00, iommu->mmio_base + MMIO_CMD_HEAD_OFFSET); | ||
433 | writel(0x00, iommu->mmio_base + MMIO_CMD_TAIL_OFFSET); | ||
434 | |||
431 | iommu_feature_enable(iommu, CONTROL_CMDBUF_EN); | 435 | iommu_feature_enable(iommu, CONTROL_CMDBUF_EN); |
432 | 436 | ||
433 | return cmd_buf; | 437 | return cmd_buf; |
@@ -1075,7 +1079,8 @@ int __init amd_iommu_init(void) | |||
1075 | goto free; | 1079 | goto free; |
1076 | 1080 | ||
1077 | /* IOMMU rlookup table - find the IOMMU for a specific device */ | 1081 | /* IOMMU rlookup table - find the IOMMU for a specific device */ |
1078 | amd_iommu_rlookup_table = (void *)__get_free_pages(GFP_KERNEL, | 1082 | amd_iommu_rlookup_table = (void *)__get_free_pages( |
1083 | GFP_KERNEL | __GFP_ZERO, | ||
1079 | get_order(rlookup_table_size)); | 1084 | get_order(rlookup_table_size)); |
1080 | if (amd_iommu_rlookup_table == NULL) | 1085 | if (amd_iommu_rlookup_table == NULL) |
1081 | goto free; | 1086 | goto free; |