mm: change pmdp_huge_get_and_clear_full take vm_area_struct as arg
We will use this in later patch to do tlb flush when clearing pmd entries. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200505071729.54912-22-aneesh.kumar@linux.ibm.com
This commit is contained in:
parent
f2b8d76dc6
commit
93a98695f2
3 changed files with 6 additions and 6 deletions
|
@ -1560,7 +1560,7 @@ static inline pmd_t pmdp_huge_get_and_clear(struct mm_struct *mm,
|
||||||
}
|
}
|
||||||
|
|
||||||
#define __HAVE_ARCH_PMDP_HUGE_GET_AND_CLEAR_FULL
|
#define __HAVE_ARCH_PMDP_HUGE_GET_AND_CLEAR_FULL
|
||||||
static inline pmd_t pmdp_huge_get_and_clear_full(struct mm_struct *mm,
|
static inline pmd_t pmdp_huge_get_and_clear_full(struct vm_area_struct *vma,
|
||||||
unsigned long addr,
|
unsigned long addr,
|
||||||
pmd_t *pmdp, int full)
|
pmd_t *pmdp, int full)
|
||||||
{
|
{
|
||||||
|
@ -1569,7 +1569,7 @@ static inline pmd_t pmdp_huge_get_and_clear_full(struct mm_struct *mm,
|
||||||
*pmdp = __pmd(_SEGMENT_ENTRY_EMPTY);
|
*pmdp = __pmd(_SEGMENT_ENTRY_EMPTY);
|
||||||
return pmd;
|
return pmd;
|
||||||
}
|
}
|
||||||
return pmdp_xchg_lazy(mm, addr, pmdp, __pmd(_SEGMENT_ENTRY_EMPTY));
|
return pmdp_xchg_lazy(vma->vm_mm, addr, pmdp, __pmd(_SEGMENT_ENTRY_EMPTY));
|
||||||
}
|
}
|
||||||
|
|
||||||
#define __HAVE_ARCH_PMDP_HUGE_CLEAR_FLUSH
|
#define __HAVE_ARCH_PMDP_HUGE_CLEAR_FLUSH
|
||||||
|
|
|
@ -159,11 +159,11 @@ static inline pud_t pudp_huge_get_and_clear(struct mm_struct *mm,
|
||||||
|
|
||||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||||
#ifndef __HAVE_ARCH_PMDP_HUGE_GET_AND_CLEAR_FULL
|
#ifndef __HAVE_ARCH_PMDP_HUGE_GET_AND_CLEAR_FULL
|
||||||
static inline pmd_t pmdp_huge_get_and_clear_full(struct mm_struct *mm,
|
static inline pmd_t pmdp_huge_get_and_clear_full(struct vm_area_struct *vma,
|
||||||
unsigned long address, pmd_t *pmdp,
|
unsigned long address, pmd_t *pmdp,
|
||||||
int full)
|
int full)
|
||||||
{
|
{
|
||||||
return pmdp_huge_get_and_clear(mm, address, pmdp);
|
return pmdp_huge_get_and_clear(vma->vm_mm, address, pmdp);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -1852,7 +1852,7 @@ int zap_huge_pmd(struct mmu_gather *tlb, struct vm_area_struct *vma,
|
||||||
* pgtable_trans_huge_withdraw after finishing pmdp related
|
* pgtable_trans_huge_withdraw after finishing pmdp related
|
||||||
* operations.
|
* operations.
|
||||||
*/
|
*/
|
||||||
orig_pmd = pmdp_huge_get_and_clear_full(tlb->mm, addr, pmd,
|
orig_pmd = pmdp_huge_get_and_clear_full(vma, addr, pmd,
|
||||||
tlb->fullmm);
|
tlb->fullmm);
|
||||||
tlb_remove_pmd_tlb_entry(tlb, pmd, addr);
|
tlb_remove_pmd_tlb_entry(tlb, pmd, addr);
|
||||||
if (vma_is_special_huge(vma)) {
|
if (vma_is_special_huge(vma)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue