提交 23c1713f 编写于 作者: J Joerg Roedel 提交者: Ingo Molnar

AMD IOMMU: use cmd_buf_size when freeing the command buffer

The command buffer release function uses the CMD_BUF_SIZE macro for
get_order. Replace this with iommu->cmd_buf_size which is more reliable
about the actual size of the buffer.
Signed-off-by: NJoerg Roedel <joerg.roedel@amd.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 b514e555
......@@ -433,7 +433,8 @@ static u8 * __init alloc_command_buffer(struct amd_iommu *iommu)
static void __init free_command_buffer(struct amd_iommu *iommu)
{
free_pages((unsigned long)iommu->cmd_buf, get_order(CMD_BUFFER_SIZE));
free_pages((unsigned long)iommu->cmd_buf,
get_order(iommu->cmd_buf_size));
}
/* allocates the memory where the IOMMU will log its events to */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册