Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b7d14f3a authored by Martin Schwidefsky's avatar Martin Schwidefsky
Browse files

s390/mm: correct transfer of dirty & young bits in __pmd_to_pte



The dirty & young bit from the pmd is not copied correctly to the
pseudo pte in __pmd_to_pte. In fact it is not copied at all, the
bits get lost. As the old style huge page currently does not need
the dirty & young information this has no effect, but may be needed
in the future.

Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 77a87f0c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -70,8 +70,8 @@ static inline pte_t __pmd_to_pte(pmd_t pmd)
		pte_val(pte) |= (pmd_val(pmd) & _SEGMENT_ENTRY_WRITE) << 4;
		pte_val(pte) |= (pmd_val(pmd) & _SEGMENT_ENTRY_INVALID) << 5;
		pte_val(pte) |= (pmd_val(pmd) & _SEGMENT_ENTRY_PROTECT);
		pmd_val(pmd) |= (pte_val(pte) & _PAGE_DIRTY) << 10;
		pmd_val(pmd) |= (pte_val(pte) & _PAGE_YOUNG) << 10;
		pte_val(pte) |= (pmd_val(pmd) & _SEGMENT_ENTRY_DIRTY) >> 10;
		pte_val(pte) |= (pmd_val(pmd) & _SEGMENT_ENTRY_YOUNG) >> 10;
	} else
		pte_val(pte) = _PAGE_INVALID;
	return pte;