[S390] s390: use change recording override for kernel mapping
We dont need the dirty bit if a write access is done via the kernel mapping. In that case SetPageDirty and friends are used anyway, no need to do that a second time. We can use the change-recording overide function for the kernel mapping, if available. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:

committed by
Martin Schwidefsky

parent
a968cd3ef1
commit
6a985c6194
@@ -70,8 +70,12 @@ static pte_t __ref *vmem_pte_alloc(void)
|
||||
pte = alloc_bootmem(PTRS_PER_PTE * sizeof(pte_t));
|
||||
if (!pte)
|
||||
return NULL;
|
||||
clear_table((unsigned long *) pte, _PAGE_TYPE_EMPTY,
|
||||
PTRS_PER_PTE * sizeof(pte_t));
|
||||
if (MACHINE_HAS_HPAGE)
|
||||
clear_table((unsigned long *) pte, _PAGE_TYPE_EMPTY | _PAGE_CO,
|
||||
PTRS_PER_PTE * sizeof(pte_t));
|
||||
else
|
||||
clear_table((unsigned long *) pte, _PAGE_TYPE_EMPTY,
|
||||
PTRS_PER_PTE * sizeof(pte_t));
|
||||
return pte;
|
||||
}
|
||||
|
||||
@@ -112,7 +116,8 @@ static int vmem_add_mem(unsigned long start, unsigned long size, int ro)
|
||||
if (MACHINE_HAS_HPAGE && !(address & ~HPAGE_MASK) &&
|
||||
(address + HPAGE_SIZE <= start + size) &&
|
||||
(address >= HPAGE_SIZE)) {
|
||||
pte_val(pte) |= _SEGMENT_ENTRY_LARGE;
|
||||
pte_val(pte) |= _SEGMENT_ENTRY_LARGE |
|
||||
_SEGMENT_ENTRY_CO;
|
||||
pmd_val(*pm_dir) = pte_val(pte);
|
||||
address += HPAGE_SIZE - PAGE_SIZE;
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user