diff options
author | Joerg Roedel <jroedel@suse.de> | 2017-06-16 17:09:56 +0300 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2017-06-22 13:54:20 +0300 |
commit | 1b1e942e344d3d41de187c1275024e915cb15844 (patch) | |
tree | bd2b1be48bbf73fba31b19dfb822ba7b02cba71d /drivers/iommu/amd_iommu_init.c | |
parent | 90b3eb03e1b2b2ece299c485ae9da0cd221e700d (diff) | |
download | linux-1b1e942e344d3d41de187c1275024e915cb15844.tar.xz |
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: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/amd_iommu_init.c')
-rw-r--r-- | drivers/iommu/amd_iommu_init.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c index 74f4eea6be77..df9ec85271f5 100644 --- a/drivers/iommu/amd_iommu_init.c +++ b/drivers/iommu/amd_iommu_init.c @@ -237,6 +237,7 @@ enum iommu_init_state { IOMMU_INITIALIZED, IOMMU_NOT_FOUND, IOMMU_INIT_ERROR, + IOMMU_CMDLINE_DISABLED, }; /* Early ioapic and hpet maps from kernel command line */ @@ -2452,6 +2453,7 @@ static int __init state_next(void) break; case IOMMU_NOT_FOUND: case IOMMU_INIT_ERROR: + case IOMMU_CMDLINE_DISABLED: /* Error states => do nothing */ ret = -EINVAL; break; @@ -2469,8 +2471,9 @@ static int __init iommu_go_to_state(enum iommu_init_state state) while (init_state != state) { ret = state_next(); - if (init_state == IOMMU_NOT_FOUND || - init_state == IOMMU_INIT_ERROR) + if (init_state == IOMMU_NOT_FOUND || + init_state == IOMMU_INIT_ERROR || + init_state == IOMMU_CMDLINE_DISABLED) break; } |