summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/amd_iommu_init.c
diff options
context:
space:
mode:
authorJoerg Roedel2015-10-20 17:33:41 +0200
committerJoerg Roedel2015-10-21 11:30:33 +0200
commitdeba4bce168a87ef90211ba69850d3428b453765 (patch)
tree99b3f037d78800eefc6c0edc40027add1b145581 /drivers/iommu/amd_iommu_init.c
parentiommu/amd: Align DTE flag definitions (diff)
downloadkernel-qcow2-linux-deba4bce168a87ef90211ba69850d3428b453765.tar.gz
kernel-qcow2-linux-deba4bce168a87ef90211ba69850d3428b453765.tar.xz
kernel-qcow2-linux-deba4bce168a87ef90211ba69850d3428b453765.zip
iommu/amd: Remove cmd_buf_size and evt_buf_size from struct amd_iommu
The driver always uses a constant size for these buffers anyway, so there is no need to waste memory to store the sizes. Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/amd_iommu_init.c')
-rw-r--r--drivers/iommu/amd_iommu_init.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c
index 3ba1ee709824..3a977a751dad 100644
--- a/drivers/iommu/amd_iommu_init.c
+++ b/drivers/iommu/amd_iommu_init.c
@@ -521,8 +521,6 @@ static u8 * __init alloc_command_buffer(struct amd_iommu *iommu)
if (cmd_buf == NULL)
return NULL;
- iommu->cmd_buf_size = CMD_BUFFER_SIZE | CMD_BUFFER_UNINITIALIZED;
-
return cmd_buf;
}
@@ -557,13 +555,11 @@ static void iommu_enable_command_buffer(struct amd_iommu *iommu)
&entry, sizeof(entry));
amd_iommu_reset_cmd_buffer(iommu);
- iommu->cmd_buf_size &= ~(CMD_BUFFER_UNINITIALIZED);
}
static void __init free_command_buffer(struct amd_iommu *iommu)
{
- free_pages((unsigned long)iommu->cmd_buf,
- get_order(iommu->cmd_buf_size & ~(CMD_BUFFER_UNINITIALIZED)));
+ free_pages((unsigned long)iommu->cmd_buf, get_order(CMD_BUFFER_SIZE));
}
/* allocates the memory where the IOMMU will log its events to */
@@ -575,8 +571,6 @@ static u8 * __init alloc_event_buffer(struct amd_iommu *iommu)
if (iommu->evt_buf == NULL)
return NULL;
- iommu->evt_buf_size = EVT_BUFFER_SIZE;
-
return iommu->evt_buf;
}