summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-06-20 08:08:46 -1000
committerLinus Torvalds <torvalds@linux-foundation.org>2013-06-20 08:08:46 -1000
commit53d5defcfa8c9603554a3174cbe206fb69f6e8ef (patch)
tree2b1429170872fce52b88f48cdef565d104fdf1df
parentf92d0dc95d137c0abe7d1478d6e7d2cf4ca5fce8 (diff)
parent8bbd9f04b7d982d1c6aeb5c08f5983b3d0b9e2fe (diff)
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Pull powerpc fix fro, Benjamin Herrenschmidt: "We accidentally broke hugetlbfs on Freescale embedded processors which use a slightly different page table layout than our server processors" * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: powerpc: Fix bad pmd error with book3E config
-rw-r--r--arch/powerpc/mm/hugetlbpage.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
index 237c8e5f264..77fdd2cef33 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -592,8 +592,14 @@ static void hugetlb_free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
do {
pmd = pmd_offset(pud, addr);
next = pmd_addr_end(addr, end);
- if (pmd_none_or_clear_bad(pmd))
+ if (!is_hugepd(pmd)) {
+ /*
+ * if it is not hugepd pointer, we should already find
+ * it cleared.
+ */
+ WARN_ON(!pmd_none_or_clear_bad(pmd));
continue;
+ }
#ifdef CONFIG_PPC_FSL_BOOK3E
/*
* Increment next by the size of the huge mapping since