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 30ae2701b3d..c6cc22815d3 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) | |||
| 427 | memcpy_toio(iommu->mmio_base + MMIO_CMD_BUF_OFFSET, | 427 | memcpy_toio(iommu->mmio_base + MMIO_CMD_BUF_OFFSET, | 
| 428 | &entry, sizeof(entry)); | 428 | &entry, sizeof(entry)); | 
| 429 | 429 | ||
| 430 | /* set head and tail to zero manually */ | ||
| 431 | writel(0x00, iommu->mmio_base + MMIO_CMD_HEAD_OFFSET); | ||
| 432 | writel(0x00, iommu->mmio_base + MMIO_CMD_TAIL_OFFSET); | ||
| 433 | |||
| 430 | iommu_feature_enable(iommu, CONTROL_CMDBUF_EN); | 434 | iommu_feature_enable(iommu, CONTROL_CMDBUF_EN); | 
| 431 | 435 | ||
| 432 | return cmd_buf; | 436 | return cmd_buf; | 
| @@ -1074,7 +1078,8 @@ int __init amd_iommu_init(void) | |||
| 1074 | goto free; | 1078 | goto free; | 
| 1075 | 1079 | ||
| 1076 | /* IOMMU rlookup table - find the IOMMU for a specific device */ | 1080 | /* IOMMU rlookup table - find the IOMMU for a specific device */ | 
| 1077 | amd_iommu_rlookup_table = (void *)__get_free_pages(GFP_KERNEL, | 1081 | amd_iommu_rlookup_table = (void *)__get_free_pages( | 
| 1082 | GFP_KERNEL | __GFP_ZERO, | ||
| 1078 | get_order(rlookup_table_size)); | 1083 | get_order(rlookup_table_size)); | 
| 1079 | if (amd_iommu_rlookup_table == NULL) | 1084 | if (amd_iommu_rlookup_table == NULL) | 
| 1080 | goto free; | 1085 | goto free; | 
