Commit cacf061c authored by Andrea Arcangeli's avatar Andrea Arcangeli Committed by Linus Torvalds

thp: fix PARAVIRT x86 32bit noPAE

This fixes TRANSPARENT_HUGEPAGE=y with PARAVIRT=y and HIGHMEM64=n.

The #ifdef that this patch removes was erratically introduced to fix a
build error for noPAE (where pmd.pmd doesn't exist).  So then the kernel
built but it failed at runtime because set_pmd_at was a noop.  This will
correct it by enabling set_pmd_at for noPAE mode too.
Signed-off-by: default avatarAndrea Arcangeli <aarcange@redhat.com>
Reported-by: default avatarwerner <w.landgraf@ru.ru>
Reported-by: default avatarMinchan Kim <minchan.kim@gmail.com>
Tested-by: default avatarMinchan Kim <minchan.kim@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 6663050e
...@@ -558,13 +558,12 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, ...@@ -558,13 +558,12 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr,
static inline void set_pmd_at(struct mm_struct *mm, unsigned long addr, static inline void set_pmd_at(struct mm_struct *mm, unsigned long addr,
pmd_t *pmdp, pmd_t pmd) pmd_t *pmdp, pmd_t pmd)
{ {
#if PAGETABLE_LEVELS >= 3
if (sizeof(pmdval_t) > sizeof(long)) if (sizeof(pmdval_t) > sizeof(long))
/* 5 arg words */ /* 5 arg words */
pv_mmu_ops.set_pmd_at(mm, addr, pmdp, pmd); pv_mmu_ops.set_pmd_at(mm, addr, pmdp, pmd);
else else
PVOP_VCALL4(pv_mmu_ops.set_pmd_at, mm, addr, pmdp, pmd.pmd); PVOP_VCALL4(pv_mmu_ops.set_pmd_at, mm, addr, pmdp,
#endif native_pmd_val(pmd));
} }
#endif #endif
......
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