summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2013-05-11 22:33:19 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-05-14 14:36:17 +1000
commit613e60a66181acc5c8b63268e939622162da2393 (patch)
tree83bacb8d2ff1861a3fa5208b5d24953a0555d9db /arch/powerpc/include/asm
parent4a3b8d0b833707811011ad14dd12dabf31fa690a (diff)
downloadop-kernel-dev-613e60a66181acc5c8b63268e939622162da2393.zip
op-kernel-dev-613e60a66181acc5c8b63268e939622162da2393.tar.gz
powerpc/mm: Use the correct mask value when looking at pgtable address
Our pgtable are 2*sizeof(pte_t)*PTRS_PER_PTE which is PTE_FRAG_SIZE. Instead of depending on frag size, mask with PMD_MASKED_BITS. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm')
-rw-r--r--arch/powerpc/include/asm/pgalloc-64.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/pgalloc-64.h b/arch/powerpc/include/asm/pgalloc-64.h
index 91acb12..b66ae72 100644
--- a/arch/powerpc/include/asm/pgalloc-64.h
+++ b/arch/powerpc/include/asm/pgalloc-64.h
@@ -186,7 +186,7 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd,
static inline pgtable_t pmd_pgtable(pmd_t pmd)
{
- return (pgtable_t)(pmd_val(pmd) & -sizeof(pte_t)*PTRS_PER_PTE);
+ return (pgtable_t)(pmd_val(pmd) & ~PMD_MASKED_BITS);
}
static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
OpenPOWER on IntegriCloud