Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 99637
b: refs/heads/master
c: 7441e9c
h: refs/heads/master
i:
  99635: 5c81717
v: v3
  • Loading branch information
Joerg Roedel authored and Ingo Molnar committed Jun 30, 2008
1 parent e78dbca commit 7c21db9
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 07c40e8a1acdb56fca485a6deeb252ebf19509a1
refs/heads/master: 7441e9cb18a1a1e5b87f516fa97b6d4abb0838e3
35 changes: 35 additions & 0 deletions trunk/arch/x86/kernel/amd_iommu_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <linux/acpi.h>
#include <linux/gfp.h>
#include <linux/list.h>
#include <linux/sysdev.h>
#include <asm/pci-direct.h>
#include <asm/amd_iommu_types.h>
#include <asm/amd_iommu.h>
Expand Down Expand Up @@ -654,6 +655,32 @@ static void __init enable_iommus(void)
}
}

/*
* Suspend/Resume support
* disable suspend until real resume implemented
*/

static int amd_iommu_resume(struct sys_device *dev)
{
return 0;
}

static int amd_iommu_suspend(struct sys_device *dev, pm_message_t state)
{
return -EINVAL;
}

static struct sysdev_class amd_iommu_sysdev_class = {
.name = "amd_iommu",
.suspend = amd_iommu_suspend,
.resume = amd_iommu_resume,
};

static struct sys_device device_amd_iommu = {
.id = 0,
.cls = &amd_iommu_sysdev_class,
};

int __init amd_iommu_init(void)
{
int i, ret = 0;
Expand Down Expand Up @@ -745,6 +772,14 @@ int __init amd_iommu_init(void)
if (ret)
goto free;

ret = sysdev_class_register(&amd_iommu_sysdev_class);
if (ret)
goto free;

ret = sysdev_register(&device_amd_iommu);
if (ret)
goto free;

enable_iommus();

printk(KERN_INFO "AMD IOMMU: aperture size is %d MB\n",
Expand Down

0 comments on commit 7c21db9

Please sign in to comment.