]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: lpae: fix definition of PTE_HWTABLE_PTRS
authorWill Deacon <will.deacon@arm.com>
Thu, 2 May 2013 12:52:01 +0000 (13:52 +0100)
committerWill Deacon <will.deacon@arm.com>
Thu, 30 May 2013 15:02:33 +0000 (16:02 +0100)
For 2-level page tables, PTE_HWTABLE_PTRS describes the offset between
Linux PTEs and hardware PTEs. On LPAE, there is no distinction (since
we have 64-bit descriptors with plenty of space) so PTE_HWTABLE_PTRS
should be 0. Unfortunately, it is wrongly defined as PTRS_PER_PTE,
meaning that current pte table flushing is off by a page. Luckily,
all current LPAE implementations are SMP, so the hardware walker can
snoop L1.

This patch fixes the broken definition.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm/include/asm/pgtable-3level.h

index 5b85b218b0f0e170494620985f18cbb85dc32e6b..d03c589cf6b5b93f109c7f99d7bc7843e74eef1a 100644 (file)
@@ -33,7 +33,7 @@
 #define PTRS_PER_PMD           512
 #define PTRS_PER_PGD           4
 
-#define PTE_HWTABLE_PTRS       (PTRS_PER_PTE)
+#define PTE_HWTABLE_PTRS       (0)
 #define PTE_HWTABLE_OFF                (0)
 #define PTE_HWTABLE_SIZE       (PTRS_PER_PTE * sizeof(u64))