arm: define __PAGETABLE_PMD_FOLDED for !LPAE
authorKirill A. Shutemov <[email protected]>
Wed, 11 Feb 2015 23:26:47 +0000 (15:26 -0800)
committerLinus Torvalds <[email protected]>
Thu, 12 Feb 2015 01:06:04 +0000 (17:06 -0800)
ARM uses custom implementation of PMD folding in 2-level page table case.
Generic code expects to see __PAGETABLE_PMD_FOLDED to be defined if PMD is
folded, but ARM doesn't do this.  Let's fix it.

Defining __PAGETABLE_PMD_FOLDED will drop out unused __pmd_alloc().  It
also fixes problems with recently-introduced pmd accounting on ARM without
LPAE.

Signed-off-by: Kirill A. Shutemov <[email protected]>
Reported-by: Nishanth Menon <[email protected]>
Reported-by: Simon Horman <[email protected]>
Tested-by: Simon Horman <[email protected]>
Tested-by: Fabio Estevam <[email protected]>
Tested-by: Felipe Balbi <[email protected]>
Tested-by: Nishanth Menon <[email protected]>
Tested-by: Peter Ujfalusi <[email protected]>
Tested-by: Krzysztof Kozlowski <[email protected]>
Tested-by: Geert Uytterhoeven <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Hugh Dickins <[email protected]>
Cc: Cyrill Gorcunov <[email protected]>
Cc: Pavel Emelyanov <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Russell King <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
arch/arm/include/asm/pgtable-2level.h

index bcc5e300413f4668e6df970a5a8166a04440f99f..bfd662e49a25efb04b1929f7dba98a0befe3e684 100644 (file)
@@ -10,6 +10,8 @@
 #ifndef _ASM_PGTABLE_2LEVEL_H
 #define _ASM_PGTABLE_2LEVEL_H
 
+#define __PAGETABLE_PMD_FOLDED
+
 /*
  * Hardware-wise, we have a two level page table structure, where the first
  * level has 4096 entries, and the second level has 256 entries.  Each entry