aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2014-09-12 16:17:23 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2014-09-14 10:25:14 -0400
commit0b70068e47e8f0c813a902dc3d6def601fd15acb (patch)
treedf0d682a73cad221961e96ee7a73f9c9d83bea66
parent02a68d0503fa470abff8852e10b1890df5730a08 (diff)
mm: export symbol dependencies of is_zero_pfn()
In order to make the static inline function is_zero_pfn() callable by modules, export its symbol dependencies 'zero_pfn' and (for s390 and mips) 'zero_page_mask'. We need this for KVM, as CONFIG_KVM is a tristate for all supported architectures except ARM and arm64, and testing a pfn whether it refers to the zero page is required to correctly distinguish the zero page from other special RAM ranges that may also have the PG_reserved bit set, but need to be treated as MMIO memory. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--arch/mips/mm/init.c1
-rw-r--r--arch/s390/mm/init.c1
-rw-r--r--mm/memory.c2
3 files changed, 4 insertions, 0 deletions
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index 571aab064936..f42e35e42790 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -53,6 +53,7 @@
53 */ 53 */
54unsigned long empty_zero_page, zero_page_mask; 54unsigned long empty_zero_page, zero_page_mask;
55EXPORT_SYMBOL_GPL(empty_zero_page); 55EXPORT_SYMBOL_GPL(empty_zero_page);
56EXPORT_SYMBOL(zero_page_mask);
56 57
57/* 58/*
58 * Not static inline because used by IP27 special magic initialization code 59 * Not static inline because used by IP27 special magic initialization code
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c
index 0c1073ed1e84..c7235e01fd67 100644
--- a/arch/s390/mm/init.c
+++ b/arch/s390/mm/init.c
@@ -43,6 +43,7 @@ pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__((__aligned__(PAGE_SIZE)));
43 43
44unsigned long empty_zero_page, zero_page_mask; 44unsigned long empty_zero_page, zero_page_mask;
45EXPORT_SYMBOL(empty_zero_page); 45EXPORT_SYMBOL(empty_zero_page);
46EXPORT_SYMBOL(zero_page_mask);
46 47
47static void __init setup_zero_pages(void) 48static void __init setup_zero_pages(void)
48{ 49{
diff --git a/mm/memory.c b/mm/memory.c
index ab3537bcfed2..1fcf59a097b3 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -118,6 +118,8 @@ __setup("norandmaps", disable_randmaps);
118unsigned long zero_pfn __read_mostly; 118unsigned long zero_pfn __read_mostly;
119unsigned long highest_memmap_pfn __read_mostly; 119unsigned long highest_memmap_pfn __read_mostly;
120 120
121EXPORT_SYMBOL(zero_pfn);
122
121/* 123/*
122 * CONFIG_MMU architectures set up ZERO_PAGE in their paging_init() 124 * CONFIG_MMU architectures set up ZERO_PAGE in their paging_init()
123 */ 125 */