aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-02-21 21:06:55 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-21 21:06:55 -0500
commit2ef14f465b9e096531343f5b734cffc5f759f4a6 (patch)
tree07b504d7105842a4b1a74cf1e153023a02fb9c1e /kernel
parentcb715a836642e0ec69350670d1c2f800f3e2d2e4 (diff)
parent0da3e7f526fde7a6522a3038b7ce609fc50f6707 (diff)
Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 mm changes from Peter Anvin: "This is a huge set of several partly interrelated (and concurrently developed) changes, which is why the branch history is messier than one would like. The *really* big items are two humonguous patchsets mostly developed by Yinghai Lu at my request, which completely revamps the way we create initial page tables. In particular, rather than estimating how much memory we will need for page tables and then build them into that memory -- a calculation that has shown to be incredibly fragile -- we now build them (on 64 bits) with the aid of a "pseudo-linear mode" -- a #PF handler which creates temporary page tables on demand. This has several advantages: 1. It makes it much easier to support things that need access to data very early (a followon patchset uses this to load microcode way early in the kernel startup). 2. It allows the kernel and all the kernel data objects to be invoked from above the 4 GB limit. This allows kdump to work on very large systems. 3. It greatly reduces the difference between Xen and native (Xen's equivalent of the #PF handler are the temporary page tables created by the domain builder), eliminating a bunch of fragile hooks. The patch series also gets us a bit closer to W^X. Additional work in this pull is the 64-bit get_user() work which you were also involved with, and a bunch of cleanups/speedups to __phys_addr()/__pa()." * 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (105 commits) x86, mm: Move reserving low memory later in initialization x86, doc: Clarify the use of asm("%edx") in uaccess.h x86, mm: Redesign get_user with a __builtin_choose_expr hack x86: Be consistent with data size in getuser.S x86, mm: Use a bitfield to mask nuisance get_user() warnings x86/kvm: Fix compile warning in kvm_register_steal_time() x86-32: Add support for 64bit get_user() x86-32, mm: Remove reference to alloc_remap() x86-32, mm: Remove reference to resume_map_numa_kva() x86-32, mm: Rip out x86_32 NUMA remapping code x86/numa: Use __pa_nodebug() instead x86: Don't panic if can not alloc buffer for swiotlb mm: Add alloc_bootmem_low_pages_nopanic() x86, 64bit, mm: hibernate use generic mapping_init x86, 64bit, mm: Mark data/bss/brk to nx x86: Merge early kernel reserve for 32bit and 64bit x86: Add Crash kernel low reservation x86, kdump: Remove crashkernel range find limit for 64bit memblock: Add memblock_mem_size() x86, boot: Not need to check setup_header version for setup_data ...
Diffstat (limited to 'kernel')
-rw-r--r--kernel/kexec.c34
1 files changed, 29 insertions, 5 deletions
diff --git a/kernel/kexec.c b/kernel/kexec.c
index 5e4bd7864c5d..2436ffcec91f 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -54,6 +54,12 @@ struct resource crashk_res = {
54 .end = 0, 54 .end = 0,
55 .flags = IORESOURCE_BUSY | IORESOURCE_MEM 55 .flags = IORESOURCE_BUSY | IORESOURCE_MEM
56}; 56};
57struct resource crashk_low_res = {
58 .name = "Crash kernel low",
59 .start = 0,
60 .end = 0,
61 .flags = IORESOURCE_BUSY | IORESOURCE_MEM
62};
57 63
58int kexec_should_crash(struct task_struct *p) 64int kexec_should_crash(struct task_struct *p)
59{ 65{
@@ -1369,10 +1375,11 @@ static int __init parse_crashkernel_simple(char *cmdline,
1369 * That function is the entry point for command line parsing and should be 1375 * That function is the entry point for command line parsing and should be
1370 * called from the arch-specific code. 1376 * called from the arch-specific code.
1371 */ 1377 */
1372int __init parse_crashkernel(char *cmdline, 1378static int __init __parse_crashkernel(char *cmdline,
1373 unsigned long long system_ram, 1379 unsigned long long system_ram,
1374 unsigned long long *crash_size, 1380 unsigned long long *crash_size,
1375 unsigned long long *crash_base) 1381 unsigned long long *crash_base,
1382 const char *name)
1376{ 1383{
1377 char *p = cmdline, *ck_cmdline = NULL; 1384 char *p = cmdline, *ck_cmdline = NULL;
1378 char *first_colon, *first_space; 1385 char *first_colon, *first_space;
@@ -1382,16 +1389,16 @@ int __init parse_crashkernel(char *cmdline,
1382 *crash_base = 0; 1389 *crash_base = 0;
1383 1390
1384 /* find crashkernel and use the last one if there are more */ 1391 /* find crashkernel and use the last one if there are more */
1385 p = strstr(p, "crashkernel="); 1392 p = strstr(p, name);
1386 while (p) { 1393 while (p) {
1387 ck_cmdline = p; 1394 ck_cmdline = p;
1388 p = strstr(p+1, "crashkernel="); 1395 p = strstr(p+1, name);
1389 } 1396 }
1390 1397
1391 if (!ck_cmdline) 1398 if (!ck_cmdline)
1392 return -EINVAL; 1399 return -EINVAL;
1393 1400
1394 ck_cmdline += 12; /* strlen("crashkernel=") */ 1401 ck_cmdline += strlen(name);
1395 1402
1396 /* 1403 /*
1397 * if the commandline contains a ':', then that's the extended 1404 * if the commandline contains a ':', then that's the extended
@@ -1409,6 +1416,23 @@ int __init parse_crashkernel(char *cmdline,
1409 return 0; 1416 return 0;
1410} 1417}
1411 1418
1419int __init parse_crashkernel(char *cmdline,
1420 unsigned long long system_ram,
1421 unsigned long long *crash_size,
1422 unsigned long long *crash_base)
1423{
1424 return __parse_crashkernel(cmdline, system_ram, crash_size, crash_base,
1425 "crashkernel=");
1426}
1427
1428int __init parse_crashkernel_low(char *cmdline,
1429 unsigned long long system_ram,
1430 unsigned long long *crash_size,
1431 unsigned long long *crash_base)
1432{
1433 return __parse_crashkernel(cmdline, system_ram, crash_size, crash_base,
1434 "crashkernel_low=");
1435}
1412 1436
1413static void update_vmcoreinfo_note(void) 1437static void update_vmcoreinfo_note(void)
1414{ 1438{