]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Fix bad pmd error with book3E config
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Wed, 19 Jun 2013 06:34:26 +0000 (12:04 +0530)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 20 Jun 2013 05:25:21 +0000 (15:25 +1000)
commite3a6fa81afa2d2a62b1660e3d513b4d890be7245
tree11ffc9d94892c617433e70bd64c977071edec0c2
parente34b95bbcd5a7cd38f9430a9a394e2facf17d7d9
powerpc: Fix bad pmd error with book3E config

Book3E uses the hugepd at PMD level and don't encode pte directly
at the pmd level. So it will find the lower bits of pmd set
and the pmd_bad check throws error. Infact the current code
will never take the free_hugepd_range call at all because it will
clear the pmd if it find a hugepd pointer. Fix this by clearing
bad pmd only if it is not a hugepd pointer.

This is regression introduced by e4a6cdbcbb1713f8ae03fa7aa75c15c4987c2a32
"powerpc: Switch 16GB and 16MB explicit hugepages to a different page table format"

Reported-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/mm/hugetlbpage.c