summaryrefslogtreecommitdiff
path: root/arch/arc/include/asm/pgalloc.h
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2015-02-06 18:44:57 +0300
committerVineet Gupta <vgupta@synopsys.com>2015-10-29 16:11:30 +0300
commit5a364c2a1762e8a78721fafc93144509c0b6cb84 (patch)
treedc74e67f8908cbfe0c5753515c8097339d55dc80 /arch/arc/include/asm/pgalloc.h
parent25d464183ca3522ae27ec1bbef5ddcbbbef65017 (diff)
downloadlinux-5a364c2a1762e8a78721fafc93144509c0b6cb84.tar.xz
ARC: mm: PAE40 support
This is the first working implementation of 40-bit physical address extension on ARCv2. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/include/asm/pgalloc.h')
-rw-r--r--arch/arc/include/asm/pgalloc.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arc/include/asm/pgalloc.h b/arch/arc/include/asm/pgalloc.h
index 9149b5ca26d7..86ed671286df 100644
--- a/arch/arc/include/asm/pgalloc.h
+++ b/arch/arc/include/asm/pgalloc.h
@@ -49,7 +49,7 @@ pmd_populate(struct mm_struct *mm, pmd_t *pmd, pgtable_t ptep)
static inline int __get_order_pgd(void)
{
- return get_order(PTRS_PER_PGD * 4);
+ return get_order(PTRS_PER_PGD * sizeof(pgd_t));
}
static inline pgd_t *pgd_alloc(struct mm_struct *mm)
@@ -87,7 +87,7 @@ static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
static inline int __get_order_pte(void)
{
- return get_order(PTRS_PER_PTE * 4);
+ return get_order(PTRS_PER_PTE * sizeof(pte_t));
}
static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
@@ -110,7 +110,7 @@ pte_alloc_one(struct mm_struct *mm, unsigned long address)
pte_pg = (pgtable_t)__get_free_pages(GFP_KERNEL | __GFP_REPEAT, __get_order_pte());
if (!pte_pg)
return 0;
- memzero((void *)pte_pg, PTRS_PER_PTE * 4);
+ memzero((void *)pte_pg, PTRS_PER_PTE * sizeof(pte_t));
page = virt_to_page(pte_pg);
if (!pgtable_page_ctor(page)) {
__free_page(page);