Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 109969
b: refs/heads/master
c: 7e4f88d
h: refs/heads/master
i:
  109967: 6603599
v: v3
  • Loading branch information
Joerg Roedel authored and Ingo Molnar committed Sep 18, 2008
1 parent 601f425 commit 9856bfd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ee2fa7435b6dddf1ca119f298ad0100cf50c0397
refs/heads/master: 7e4f88da7bf1887563f70bd5edbbd0479e31dc12
12 changes: 8 additions & 4 deletions trunk/arch/x86/kernel/amd_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,21 +101,23 @@ static int iommu_queue_command(struct amd_iommu *iommu, struct iommu_cmd *cmd)
*/
static int iommu_completion_wait(struct amd_iommu *iommu)
{
int ret, ready = 0;
int ret = 0, ready = 0;
unsigned status = 0;
struct iommu_cmd cmd;
unsigned long i = 0;
unsigned long flags, i = 0;

memset(&cmd, 0, sizeof(cmd));
cmd.data[0] = CMD_COMPL_WAIT_INT_MASK;
CMD_SET_TYPE(&cmd, CMD_COMPL_WAIT);

iommu->need_sync = 0;

ret = iommu_queue_command(iommu, &cmd);
spin_lock_irqsave(&iommu->lock, flags);

ret = __iommu_queue_command(iommu, &cmd);

if (ret)
return ret;
goto out;

while (!ready && (i < EXIT_LOOP_COUNT)) {
++i;
Expand All @@ -130,6 +132,8 @@ static int iommu_completion_wait(struct amd_iommu *iommu)

if (unlikely((i == EXIT_LOOP_COUNT) && printk_ratelimit()))
printk(KERN_WARNING "AMD IOMMU: Completion wait loop failed\n");
out:
spin_unlock_irqrestore(&iommu->lock, flags);

return 0;
}
Expand Down

0 comments on commit 9856bfd

Please sign in to comment.