Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 145906
b: refs/heads/master
c: 736501e
h: refs/heads/master
v: v3
  • Loading branch information
Joerg Roedel committed May 28, 2009
1 parent ea27408 commit 8aed08b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 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: 05f92db9f47f852ff48bbed1b063b8ab8ad00285
refs/heads/master: 736501ee000757082a4f0832826ae1eda7ea106e
21 changes: 20 additions & 1 deletion trunk/arch/x86/kernel/amd_iommu_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -965,12 +965,31 @@ static void disable_iommus(void)

static int amd_iommu_resume(struct sys_device *dev)
{
/*
* Disable IOMMUs before reprogramming the hardware registers.
* IOMMU is still enabled from the resume kernel.
*/
disable_iommus();

/* re-load the hardware */
enable_iommus();

/*
* we have to flush after the IOMMUs are enabled because a
* disabled IOMMU will never execute the commands we send
*/
amd_iommu_flush_all_domains();
amd_iommu_flush_all_devices();

return 0;
}

static int amd_iommu_suspend(struct sys_device *dev, pm_message_t state)
{
return -EINVAL;
/* disable IOMMUs to go out of the way for BIOS */
disable_iommus();

return 0;
}

static struct sysdev_class amd_iommu_sysdev_class = {
Expand Down

0 comments on commit 8aed08b

Please sign in to comment.