summaryrefslogtreecommitdiffstats
path: root/arch/s390/mm/vmem.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2016-05-17 12:17:51 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2016-06-13 15:58:14 +0200
commit5aa29975e81851b7d48cb79c0c95d95360bfd9a6 (patch)
treea06d7a999a8c50d1cde2cf387ad84923765a2a5c /arch/s390/mm/vmem.c
parents390/pgtable: get rid of _REGION3_ENTRY_RO (diff)
downloadlinux-5aa29975e81851b7d48cb79c0c95d95360bfd9a6.tar.xz
linux-5aa29975e81851b7d48cb79c0c95d95360bfd9a6.zip
s390/vmem: make use of pte_clear()
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>
Diffstat (limited to 'arch/s390/mm/vmem.c')
-rw-r--r--arch/s390/mm/vmem.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c
index 2020ef8c0413..4badd8252e3c 100644
--- a/arch/s390/mm/vmem.c
+++ b/arch/s390/mm/vmem.c
@@ -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)) {
@@ -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);