Skip to content

Commit 9291ea0

Browse files
hcahcaVasily Gorbik
authored andcommitted
s390/tlb: Use mm_has_pgste() instead of mm_alloc_pgste()
An mm has pgstes only after s390_enable_sie() has been called, while mm_alloc_pgste() may be always true (e.g. via sysctl setting). Limit the calls to gmap_unlink() in pte_free_tlb() to those cases where there might be something to unlink. Reviewed-by: Alexander Gordeev <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
1 parent df4623f commit 9291ea0

File tree

1 file changed

+1
-1
lines changed
  • arch/s390/include/asm

1 file changed

+1
-1
lines changed

arch/s390/include/asm/tlb.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ static inline void pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte,
8484
tlb->mm->context.flush_mm = 1;
8585
tlb->freed_tables = 1;
8686
tlb->cleared_pmds = 1;
87-
if (mm_alloc_pgste(tlb->mm))
87+
if (mm_has_pgste(tlb->mm))
8888
gmap_unlink(tlb->mm, (unsigned long *)pte, address);
8989
tlb_remove_ptdesc(tlb, virt_to_ptdesc(pte));
9090
}

0 commit comments

Comments
 (0)