summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/page.h
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2013-01-24 21:20:05 +0100
committerH. Peter Anvin <hpa@linux.intel.com>2013-01-30 00:26:35 +0100
commit0e691cf824f76adefb4498fe39c300aba2c2575a (patch)
tree6e61f59e7f100eac02a9aa7e064eaaa34e4e1904 /arch/x86/include/asm/page.h
parentx86, kexec: Replace ident_mapping_init and init_level4_page (diff)
downloadlinux-0e691cf824f76adefb4498fe39c300aba2c2575a.tar.xz
linux-0e691cf824f76adefb4498fe39c300aba2c2575a.zip
x86, kexec, 64bit: Only set ident mapping for ram.
We should set mappings only for usable memory ranges under max_pfn Otherwise causes same problem that is fixed by x86, mm: Only direct map addresses that are marked as E820_RAM This patch exposes pfn_mapped array, and only sets ident mapping for ranges in that array. This patch relies on new kernel_ident_mapping_init that could handle existing pgd/pud between different calls. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Link: http://lkml.kernel.org/r/1359058816-7615-25-git-send-email-yinghai@kernel.org Cc: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/include/asm/page.h')
-rw-r--r--arch/x86/include/asm/page.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/include/asm/page.h b/arch/x86/include/asm/page.h
index 8ca82839288a..100a20c7b98d 100644
--- a/arch/x86/include/asm/page.h
+++ b/arch/x86/include/asm/page.h
@@ -17,6 +17,10 @@
struct page;
+#include <linux/range.h>
+extern struct range pfn_mapped[];
+extern int nr_pfn_mapped;
+
static inline void clear_user_page(void *page, unsigned long vaddr,
struct page *pg)
{