diff options
| -rw-r--r-- | arch/x86/kernel/amd_iommu_init.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c index 2efc3d59b7e6..e0ff9404e6c9 100644 --- a/arch/x86/kernel/amd_iommu_init.c +++ b/arch/x86/kernel/amd_iommu_init.c | |||
| @@ -1042,20 +1042,10 @@ static int __init parse_amd_iommu_options(char *str) | |||
| 1042 | 1042 | ||
| 1043 | static int __init parse_amd_iommu_size_options(char *str) | 1043 | static int __init parse_amd_iommu_size_options(char *str) |
| 1044 | { | 1044 | { |
| 1045 | for (; *str; ++str) { | 1045 | unsigned order = PAGE_SHIFT + get_order(memparse(str, &str)); |
| 1046 | if (strcmp(str, "32M") == 0) | 1046 | |
| 1047 | amd_iommu_aperture_order = 25; | 1047 | if ((order > 24) && (order < 31)) |
| 1048 | if (strcmp(str, "64M") == 0) | 1048 | amd_iommu_aperture_order = order; |
| 1049 | amd_iommu_aperture_order = 26; | ||
| 1050 | if (strcmp(str, "128M") == 0) | ||
| 1051 | amd_iommu_aperture_order = 27; | ||
| 1052 | if (strcmp(str, "256M") == 0) | ||
| 1053 | amd_iommu_aperture_order = 28; | ||
| 1054 | if (strcmp(str, "512M") == 0) | ||
| 1055 | amd_iommu_aperture_order = 29; | ||
| 1056 | if (strcmp(str, "1G") == 0) | ||
| 1057 | amd_iommu_aperture_order = 30; | ||
| 1058 | } | ||
| 1059 | 1049 | ||
| 1060 | return 1; | 1050 | return 1; |
| 1061 | } | 1051 | } |
