Commit 5aa29975 authored by Heiko Carstens's avatar Heiko Carstens Committed by Martin Schwidefsky

s390/vmem: make use of pte_clear()

Use pte_clear() instead of open-coding it.
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent c126aa83
...@@ -148,9 +148,7 @@ static void vmem_remove_range(unsigned long start, unsigned long size) ...@@ -148,9 +148,7 @@ static void vmem_remove_range(unsigned long start, unsigned long size)
pud_t *pu_dir; pud_t *pu_dir;
pmd_t *pm_dir; pmd_t *pm_dir;
pte_t *pt_dir; pte_t *pt_dir;
pte_t pte;
pte_val(pte) = _PAGE_INVALID;
while (address < end) { while (address < end) {
pg_dir = pgd_offset_k(address); pg_dir = pgd_offset_k(address);
if (pgd_none(*pg_dir)) { if (pgd_none(*pg_dir)) {
...@@ -178,7 +176,7 @@ static void vmem_remove_range(unsigned long start, unsigned long size) ...@@ -178,7 +176,7 @@ static void vmem_remove_range(unsigned long start, unsigned long size)
continue; continue;
} }
pt_dir = pte_offset_kernel(pm_dir, address); pt_dir = pte_offset_kernel(pm_dir, address);
*pt_dir = pte; pte_clear(&init_mm, address, pt_dir);
address += PAGE_SIZE; address += PAGE_SIZE;
} }
flush_tlb_kernel_range(start, end); flush_tlb_kernel_range(start, end);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment