Commit 1d36022f authored by David S. Miller's avatar David S. Miller

[MM]: Do not even do the runtime PTRS_PER_{PMD,PUD} checks.

Based upon suggestions from Nick Piggin.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c2008f24
......@@ -2100,7 +2100,6 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct * vma,
*/
pud_t fastcall *__pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address)
{
if (PTRS_PER_PUD > 1) {
pud_t *new;
spin_unlock(&mm->page_table_lock);
......@@ -2120,8 +2119,6 @@ pud_t fastcall *__pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long addr
pgd_populate(mm, pgd, new);
out:
return pud_offset(pgd, address);
}
return NULL;
}
/*
......@@ -2135,7 +2132,6 @@ pud_t fastcall *__pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long addr
*/
pmd_t fastcall *__pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address)
{
if (PTRS_PER_PMD > 1) {
pmd_t *new;
spin_unlock(&mm->page_table_lock);
......@@ -2155,8 +2151,6 @@ pmd_t fastcall *__pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long addr
pud_populate(mm, pud, new);
out:
return pmd_offset(pud, address);
}
return NULL;
}
#else
pmd_t fastcall *__pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment