Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 245380
b: refs/heads/master
c: 94fe79e
h: refs/heads/master
v: v3
  • Loading branch information
Joerg Roedel committed Apr 6, 2011
1 parent ed7c626 commit b172222
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: ded467374a34eb80020c2213456b1d9ca946b88c
refs/heads/master: 94fe79e2f100bfcd8e7689cbf8838634779b80a2
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 @@ -390,6 +390,13 @@ static void build_completion_wait(struct iommu_cmd *cmd)
CMD_SET_TYPE(cmd, CMD_COMPL_WAIT);
}

static void build_inv_dte(struct iommu_cmd *cmd, u16 devid)
{
memset(cmd, 0, sizeof(*cmd));
cmd->data[0] = devid;
CMD_SET_TYPE(cmd, CMD_INV_DEV_ENTRY);
}

/*
* Writes the command to the IOMMUs command buffer and informs the
* hardware about the new command. Must be called with iommu->lock held.
Expand Down Expand Up @@ -533,10 +540,7 @@ static int iommu_flush_device(struct device *dev)
devid = get_device_id(dev);
iommu = amd_iommu_rlookup_table[devid];

/* Build command */
memset(&cmd, 0, sizeof(cmd));
CMD_SET_TYPE(&cmd, CMD_INV_DEV_ENTRY);
cmd.data[0] = devid;
build_inv_dte(&cmd, devid);

return iommu_queue_command(iommu, &cmd);
}
Expand Down

0 comments on commit b172222

Please sign in to comment.