mm: export symbol dependencies of is_zero_pfn()
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 12 Sep 2014 20:17:23 +0000 (22:17 +0200)
committerChristoffer Dall <christoffer.dall@linaro.org>
Wed, 8 Oct 2014 09:11:27 +0000 (11:11 +0200)
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>
(cherry picked from commit 0b70068e47e8f0c813a902dc3d6def601fd15acb)
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
arch/mips/mm/init.c
arch/s390/mm/init.c
mm/memory.c

index 9b973e0af9cbbd2ba7c164fcfea8d9ac93265d36..d340d53c345b621bb93084993a2b685ef07b4ff2 100644 (file)
@@ -74,6 +74,7 @@
  */
 unsigned long empty_zero_page, zero_page_mask;
 EXPORT_SYMBOL_GPL(empty_zero_page);
+EXPORT_SYMBOL(zero_page_mask);
 
 /*
  * Not static inline because used by IP27 special magic initialization code
index eba15f18fd38b331de68410a29c303d4429985c3..a4dfc0bd05dba509e425aded6aeb77fdd713e16b 100644 (file)
@@ -43,6 +43,7 @@ pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__((__aligned__(PAGE_SIZE)));
 
 unsigned long empty_zero_page, zero_page_mask;
 EXPORT_SYMBOL(empty_zero_page);
+EXPORT_SYMBOL(zero_page_mask);
 
 static void __init setup_zero_pages(void)
 {
index 5a35443c01ad4845a9dc32b947e02fb65ea29200..20bb9e9017817ecb29ff492f723d868c58827ed2 100644 (file)
@@ -118,6 +118,8 @@ __setup("norandmaps", disable_randmaps);
 unsigned long zero_pfn __read_mostly;
 unsigned long highest_memmap_pfn __read_mostly;
 
+EXPORT_SYMBOL(zero_pfn);
+
 /*
  * CONFIG_MMU architectures set up ZERO_PAGE in their paging_init()
  */