aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/amd_iommu.c
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2008-07-11 11:14:28 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-11 12:01:14 -0400
commitd64495366ff78fdbd5bd3176a7ada2f0c2cbfba6 (patch)
treef057220b26ee6b7569af8384361915214bca31df /arch/x86/kernel/amd_iommu.c
parent136f78a19cf94d469f31a4009c7c0ac2301fbbf0 (diff)
x86, AMD IOMMU: rename struct command to iommu_cmd
This patch gives the struct command a more descriptive and not so generic name. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Cc: iommu@lists.linux-foundation.org Cc: bhavna.sarathy@amd.com Cc: robert.richter@amd.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/amd_iommu.c')
-rw-r--r--arch/x86/kernel/amd_iommu.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
index 7fa2d5d57dd8..dec10e1a397c 100644
--- a/arch/x86/kernel/amd_iommu.c
+++ b/arch/x86/kernel/amd_iommu.c
@@ -39,7 +39,7 @@ static DEFINE_RWLOCK(amd_iommu_devtable_lock);
39/* 39/*
40 * general struct to manage commands send to an IOMMU 40 * general struct to manage commands send to an IOMMU
41 */ 41 */
42struct command { 42struct iommu_cmd {
43 u32 data[4]; 43 u32 data[4];
44}; 44};
45 45
@@ -62,7 +62,7 @@ static int iommu_has_npcache(struct amd_iommu *iommu)
62 * Writes the command to the IOMMUs command buffer and informs the 62 * Writes the command to the IOMMUs command buffer and informs the
63 * hardware about the new command. Must be called with iommu->lock held. 63 * hardware about the new command. Must be called with iommu->lock held.
64 */ 64 */
65static int __iommu_queue_command(struct amd_iommu *iommu, struct command *cmd) 65static int __iommu_queue_command(struct amd_iommu *iommu, struct iommu_cmd *cmd)
66{ 66{
67 u32 tail, head; 67 u32 tail, head;
68 u8 *target; 68 u8 *target;
@@ -83,7 +83,7 @@ static int __iommu_queue_command(struct amd_iommu *iommu, struct command *cmd)
83 * General queuing function for commands. Takes iommu->lock and calls 83 * General queuing function for commands. Takes iommu->lock and calls
84 * __iommu_queue_command(). 84 * __iommu_queue_command().
85 */ 85 */
86static int iommu_queue_command(struct amd_iommu *iommu, struct command *cmd) 86static int iommu_queue_command(struct amd_iommu *iommu, struct iommu_cmd *cmd)
87{ 87{
88 unsigned long flags; 88 unsigned long flags;
89 int ret; 89 int ret;
@@ -105,7 +105,7 @@ static int iommu_queue_command(struct amd_iommu *iommu, struct command *cmd)
105static int iommu_completion_wait(struct amd_iommu *iommu) 105static int iommu_completion_wait(struct amd_iommu *iommu)
106{ 106{
107 int ret; 107 int ret;
108 struct command cmd; 108 struct iommu_cmd cmd;
109 volatile u64 ready = 0; 109 volatile u64 ready = 0;
110 unsigned long ready_phys = virt_to_phys(&ready); 110 unsigned long ready_phys = virt_to_phys(&ready);
111 unsigned long i = 0; 111 unsigned long i = 0;
@@ -139,7 +139,7 @@ static int iommu_completion_wait(struct amd_iommu *iommu)
139 */ 139 */
140static int iommu_queue_inv_dev_entry(struct amd_iommu *iommu, u16 devid) 140static int iommu_queue_inv_dev_entry(struct amd_iommu *iommu, u16 devid)
141{ 141{
142 struct command cmd; 142 struct iommu_cmd cmd;
143 143
144 BUG_ON(iommu == NULL); 144 BUG_ON(iommu == NULL);
145 145
@@ -158,7 +158,7 @@ static int iommu_queue_inv_dev_entry(struct amd_iommu *iommu, u16 devid)
158static int iommu_queue_inv_iommu_pages(struct amd_iommu *iommu, 158static int iommu_queue_inv_iommu_pages(struct amd_iommu *iommu,
159 u64 address, u16 domid, int pde, int s) 159 u64 address, u16 domid, int pde, int s)
160{ 160{
161 struct command cmd; 161 struct iommu_cmd cmd;
162 162
163 memset(&cmd, 0, sizeof(cmd)); 163 memset(&cmd, 0, sizeof(cmd));
164 address &= PAGE_MASK; 164 address &= PAGE_MASK;