Skip to content

Commit

Permalink
s390/vmem: make use of pte_clear()
Browse files Browse the repository at this point in the history
Use pte_clear() instead of open-coding it.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Jun 13, 2016
1 parent c126aa8 commit 5aa2997
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions arch/s390/mm/vmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,7 @@ static void vmem_remove_range(unsigned long start, unsigned long size)
pud_t *pu_dir;
pmd_t *pm_dir;
pte_t *pt_dir;
pte_t pte;

pte_val(pte) = _PAGE_INVALID;
while (address < end) {
pg_dir = pgd_offset_k(address);
if (pgd_none(*pg_dir)) {
Expand Down Expand Up @@ -178,7 +176,7 @@ static void vmem_remove_range(unsigned long start, unsigned long size)
continue;
}
pt_dir = pte_offset_kernel(pm_dir, address);
*pt_dir = pte;
pte_clear(&init_mm, address, pt_dir);
address += PAGE_SIZE;
}
flush_tlb_kernel_range(start, end);
Expand Down

0 comments on commit 5aa2997

Please sign in to comment.