提交 1b1e942e 编写于 作者: J Joerg Roedel

iommu/amd: Add new init-state IOMMU_CMDLINE_DISABLED

This will be used when during initialization we detect that
the iommu should be disabled.
Signed-off-by: NJoerg Roedel <jroedel@suse.de>
上级 90b3eb03
...@@ -237,6 +237,7 @@ enum iommu_init_state { ...@@ -237,6 +237,7 @@ enum iommu_init_state {
IOMMU_INITIALIZED, IOMMU_INITIALIZED,
IOMMU_NOT_FOUND, IOMMU_NOT_FOUND,
IOMMU_INIT_ERROR, IOMMU_INIT_ERROR,
IOMMU_CMDLINE_DISABLED,
}; };
/* Early ioapic and hpet maps from kernel command line */ /* Early ioapic and hpet maps from kernel command line */
...@@ -2452,6 +2453,7 @@ static int __init state_next(void) ...@@ -2452,6 +2453,7 @@ static int __init state_next(void)
break; break;
case IOMMU_NOT_FOUND: case IOMMU_NOT_FOUND:
case IOMMU_INIT_ERROR: case IOMMU_INIT_ERROR:
case IOMMU_CMDLINE_DISABLED:
/* Error states => do nothing */ /* Error states => do nothing */
ret = -EINVAL; ret = -EINVAL;
break; break;
...@@ -2469,8 +2471,9 @@ static int __init iommu_go_to_state(enum iommu_init_state state) ...@@ -2469,8 +2471,9 @@ static int __init iommu_go_to_state(enum iommu_init_state state)
while (init_state != state) { while (init_state != state) {
ret = state_next(); ret = state_next();
if (init_state == IOMMU_NOT_FOUND || if (init_state == IOMMU_NOT_FOUND ||
init_state == IOMMU_INIT_ERROR) init_state == IOMMU_INIT_ERROR ||
init_state == IOMMU_CMDLINE_DISABLED)
break; break;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册