From: Petr Tesarik <ptesarik@suse.cz>
Subject: Save PG_compound or PG_head value in VMCOREINFO
References: bnc#741191
Patch-mainline: no

To allow filtering of huge pages, makedumpfile must be able to identify
them in the dump. This can be done by checking for the appropriate
page flag, but its value must be known to makedumpfile.

Because some PG_xxx flags are already saved to VMCOREINFO, simply add one
more.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>

---
 kernel/kexec.c |    5 +++++
 1 file changed, 5 insertions(+)

--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -1522,6 +1522,11 @@ static int __init crash_save_vmcoreinfo_
 	VMCOREINFO_NUMBER(NR_FREE_PAGES);
 	VMCOREINFO_NUMBER(PG_lru);
 	VMCOREINFO_NUMBER(PG_private);
+#ifdef CONFIG_PAGEFLAGS_EXTENDED
+	VMCOREINFO_NUMBER(PG_head);
+#else
+	VMCOREINFO_NUMBER(PG_compound);
+#endif
 	VMCOREINFO_NUMBER(PG_swapcache);
 
 	arch_crash_save_vmcoreinfo();
