kexec: crash: don't save swapper_pg_dir for !CONFIG_MMU configurations
authorWill Deacon <[email protected]>
Wed, 28 Mar 2012 21:42:47 +0000 (14:42 -0700)
committerLinus Torvalds <[email protected]>
Thu, 29 Mar 2012 00:14:36 +0000 (17:14 -0700)
nommu platforms don't have very interesting swapper_pg_dir pointers and
usually just #define them to NULL, meaning that we can't include them in
the vmcoreinfo on the kexec crash path.

This patch only saves the swapper_pg_dir if we have an MMU.

Signed-off-by: Will Deacon <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Cc: "Eric W. Biederman" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
kernel/kexec.c

index a6a675cb9818ad43728ba7246472f62b44fcd23b..769e347c51967ee889e82ab1073da1e847aa30b2 100644 (file)
@@ -1462,7 +1462,9 @@ static int __init crash_save_vmcoreinfo_init(void)
 
        VMCOREINFO_SYMBOL(init_uts_ns);
        VMCOREINFO_SYMBOL(node_online_map);
+#ifdef CONFIG_MMU
        VMCOREINFO_SYMBOL(swapper_pg_dir);
+#endif
        VMCOREINFO_SYMBOL(_stext);
        VMCOREINFO_SYMBOL(vmlist);