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

Commit 171c4006 authored by Gerald Schaefer's avatar Gerald Schaefer Committed by Martin Schwidefsky
Browse files

s390/mm: fix pmd_pfn() for thp



The pfn calculation in pmd_pfn() is broken for thp, because it uses
HPAGE_SHIFT instead of the normal PAGE_SHIFT. This is fixed by removing
the distinction between thp and normal pmds in that function, and always
using PAGE_SHIFT.

Reported-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: default avatarGerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent b719f430
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -1387,9 +1387,6 @@ static inline int has_transparent_hugepage(void)

static inline unsigned long pmd_pfn(pmd_t pmd)
{
	if (pmd_trans_huge(pmd))
		return pmd_val(pmd) >> HPAGE_SHIFT;
	else
	return pmd_val(pmd) >> PAGE_SHIFT;
}
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */