]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
arm64: Fix build with CONFIG_DEBUG_PAGEALLOC=n
authorCatalin Marinas <catalin.marinas@arm.com>
Wed, 10 Feb 2016 11:17:34 +0000 (11:17 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 10 Feb 2016 11:17:34 +0000 (11:17 +0000)
Commit 5b09ee56b9f0 ("arm64: Add support for
ARCH_SUPPORTS_DEBUG_PAGEALLOC") introduces a call to
debug_pagealloc_enabled() which is not defined in when
CONFIG_DEBUG_PAGEALLOC=n. Add the necessary #ifdef to the arm64 code.

Note that this change will be reverted once the patch for defining
debug_pagealloc_enabled() is upstreamed.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/mm/mmu.c

index f1bc2b73d9985a381094c4d01fdda8f1a7164a34..c3e5df62671e6c4eb8c4a4502dd16f0162224256 100644 (file)
@@ -156,6 +156,7 @@ static void split_pud(pud_t *old_pud, pmd_t *pmd)
        } while (pmd++, i++, i < PTRS_PER_PMD);
 }
 
+#ifdef CONFIG_DEBUG_PAGEALLOC
 static bool block_mappings_allowed(phys_addr_t (*pgtable_alloc)(void))
 {
 
@@ -168,6 +169,12 @@ static bool block_mappings_allowed(phys_addr_t (*pgtable_alloc)(void))
         */
        return !pgtable_alloc || !debug_pagealloc_enabled();
 }
+#else
+static bool block_mappings_allowed(phys_addr_t (*pgtable_alloc)(void))
+{
+       return true;
+}
+#endif
 
 static void alloc_init_pmd(pud_t *pud, unsigned long addr, unsigned long end,
                                  phys_addr_t phys, pgprot_t prot,