Skip to content

Commit 93a9869

Browse files
kvaneeshmpe
authored andcommitted
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 <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent f2b8d76 commit 93a9869

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

arch/s390/include/asm/pgtable.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1560,7 +1560,7 @@ static inline pmd_t pmdp_huge_get_and_clear(struct mm_struct *mm,
15601560
}
15611561

15621562
#define __HAVE_ARCH_PMDP_HUGE_GET_AND_CLEAR_FULL
1563-
static inline pmd_t pmdp_huge_get_and_clear_full(struct mm_struct *mm,
1563+
static inline pmd_t pmdp_huge_get_and_clear_full(struct vm_area_struct *vma,
15641564
unsigned long addr,
15651565
pmd_t *pmdp, int full)
15661566
{
@@ -1569,7 +1569,7 @@ static inline pmd_t pmdp_huge_get_and_clear_full(struct mm_struct *mm,
15691569
*pmdp = __pmd(_SEGMENT_ENTRY_EMPTY);
15701570
return pmd;
15711571
}
1572-
return pmdp_xchg_lazy(mm, addr, pmdp, __pmd(_SEGMENT_ENTRY_EMPTY));
1572+
return pmdp_xchg_lazy(vma->vm_mm, addr, pmdp, __pmd(_SEGMENT_ENTRY_EMPTY));
15731573
}
15741574

15751575
#define __HAVE_ARCH_PMDP_HUGE_CLEAR_FLUSH

include/asm-generic/pgtable.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,11 @@ static inline pud_t pudp_huge_get_and_clear(struct mm_struct *mm,
159159

160160
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
161161
#ifndef __HAVE_ARCH_PMDP_HUGE_GET_AND_CLEAR_FULL
162-
static inline pmd_t pmdp_huge_get_and_clear_full(struct mm_struct *mm,
162+
static inline pmd_t pmdp_huge_get_and_clear_full(struct vm_area_struct *vma,
163163
unsigned long address, pmd_t *pmdp,
164164
int full)
165165
{
166-
return pmdp_huge_get_and_clear(mm, address, pmdp);
166+
return pmdp_huge_get_and_clear(vma->vm_mm, address, pmdp);
167167
}
168168
#endif
169169

mm/huge_memory.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1852,8 +1852,8 @@ int zap_huge_pmd(struct mmu_gather *tlb, struct vm_area_struct *vma,
18521852
* pgtable_trans_huge_withdraw after finishing pmdp related
18531853
* operations.
18541854
*/
1855-
orig_pmd = pmdp_huge_get_and_clear_full(tlb->mm, addr, pmd,
1856-
tlb->fullmm);
1855+
orig_pmd = pmdp_huge_get_and_clear_full(vma, addr, pmd,
1856+
tlb->fullmm);
18571857
tlb_remove_pmd_tlb_entry(tlb, pmd, addr);
18581858
if (vma_is_special_huge(vma)) {
18591859
if (arch_needs_pgtable_deposit())

0 commit comments

Comments
 (0)