aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/e820.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index 9836a079cfd9..3451e0b3f324 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -1165,6 +1165,8 @@ static void early_panic(char *msg)
1165 panic(msg); 1165 panic(msg);
1166} 1166}
1167 1167
1168static int userdef __initdata;
1169
1168/* "mem=nopentium" disables the 4MB page tables. */ 1170/* "mem=nopentium" disables the 4MB page tables. */
1169static int __init parse_memopt(char *p) 1171static int __init parse_memopt(char *p)
1170{ 1172{
@@ -1180,17 +1182,15 @@ static int __init parse_memopt(char *p)
1180 } 1182 }
1181#endif 1183#endif
1182 1184
1185 userdef = 1;
1183 mem_size = memparse(p, &p); 1186 mem_size = memparse(p, &p);
1184 end_user_pfn = mem_size>>PAGE_SHIFT; 1187 end_user_pfn = mem_size>>PAGE_SHIFT;
1185 e820_update_range(mem_size, ULLONG_MAX - mem_size, 1188 e820_remove_range(mem_size, ULLONG_MAX - mem_size, E820_RAM, 1);
1186 E820_RAM, E820_RESERVED);
1187 1189
1188 return 0; 1190 return 0;
1189} 1191}
1190early_param("mem", parse_memopt); 1192early_param("mem", parse_memopt);
1191 1193
1192static int userdef __initdata;
1193
1194static int __init parse_memmap_opt(char *p) 1194static int __init parse_memmap_opt(char *p)
1195{ 1195{
1196 char *oldp; 1196 char *oldp;
@@ -1230,8 +1230,7 @@ static int __init parse_memmap_opt(char *p)
1230 e820_add_region(start_at, mem_size, E820_RESERVED); 1230 e820_add_region(start_at, mem_size, E820_RESERVED);
1231 } else { 1231 } else {
1232 end_user_pfn = (mem_size >> PAGE_SHIFT); 1232 end_user_pfn = (mem_size >> PAGE_SHIFT);
1233 e820_update_range(mem_size, ULLONG_MAX - mem_size, 1233 e820_remove_range(mem_size, ULLONG_MAX - mem_size, E820_RAM, 1);
1234 E820_RAM, E820_RESERVED);
1235 } 1234 }
1236 return *p == '\0' ? 0 : -EINVAL; 1235 return *p == '\0' ? 0 : -EINVAL;
1237} 1236}