diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2008-09-17 11:18:17 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-19 06:59:31 -0400 |
commit | 23c1713fe9e6ac886a4d44415298d0cbb2e83df2 (patch) | |
tree | 8726c12786a9922bd68d1e5c99a092af67e1827c | |
parent | b514e55569855bbaab782a8ec073630ed4e99c68 (diff) |
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: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/kernel/amd_iommu_init.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c index 80250e63bd07..db0c83af44de 100644 --- a/arch/x86/kernel/amd_iommu_init.c +++ b/arch/x86/kernel/amd_iommu_init.c | |||
@@ -433,7 +433,8 @@ static u8 * __init alloc_command_buffer(struct amd_iommu *iommu) | |||
433 | 433 | ||
434 | static void __init free_command_buffer(struct amd_iommu *iommu) | 434 | static void __init free_command_buffer(struct amd_iommu *iommu) |
435 | { | 435 | { |
436 | free_pages((unsigned long)iommu->cmd_buf, get_order(CMD_BUFFER_SIZE)); | 436 | free_pages((unsigned long)iommu->cmd_buf, |
437 | get_order(iommu->cmd_buf_size)); | ||
437 | } | 438 | } |
438 | 439 | ||
439 | /* allocates the memory where the IOMMU will log its events to */ | 440 | /* allocates the memory where the IOMMU will log its events to */ |