summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2015-04-22 10:26:20 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2015-04-23 16:56:20 +0200
commitb7d14f3a92223c3f5e52e9f20c74cb96dc130e87 (patch)
tree924f6b3fb2b7a364d250763ca45f84dbce7ab6af /arch
parent77a87f0cb1a57237860754525d4e8cb2789e6e12 (diff)
downloadlinux-b7d14f3a92223c3f5e52e9f20c74cb96dc130e87.tar.gz
linux-b7d14f3a92223c3f5e52e9f20c74cb96dc130e87.tar.bz2
linux-b7d14f3a92223c3f5e52e9f20c74cb96dc130e87.zip
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: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/s390/mm/hugetlbpage.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/mm/hugetlbpage.c b/arch/s390/mm/hugetlbpage.c
index 210ffede0153..c67e8bf012b6 100644
--- a/arch/s390/mm/hugetlbpage.c
+++ b/arch/s390/mm/hugetlbpage.c
@@ -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;