diff options
author | Gerald Schaefer <gerald.schaefer@de.ibm.com> | 2013-01-09 12:49:51 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-01-12 12:49:25 -0500 |
commit | 171c4006fb1b42a084057a71c86776e9f1b8e62c (patch) | |
tree | 84ea088530fdda5322b144ccfbf32b9502fcf737 /arch | |
parent | b719f43059903820c31edb30f4663a2818836e7f (diff) |
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: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/include/asm/pgtable.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index c928dc1938f2..c1d7930a82f4 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h | |||
@@ -1387,10 +1387,7 @@ static inline int has_transparent_hugepage(void) | |||
1387 | 1387 | ||
1388 | static inline unsigned long pmd_pfn(pmd_t pmd) | 1388 | static inline unsigned long pmd_pfn(pmd_t pmd) |
1389 | { | 1389 | { |
1390 | if (pmd_trans_huge(pmd)) | 1390 | return pmd_val(pmd) >> PAGE_SHIFT; |
1391 | return pmd_val(pmd) >> HPAGE_SHIFT; | ||
1392 | else | ||
1393 | return pmd_val(pmd) >> PAGE_SHIFT; | ||
1394 | } | 1391 | } |
1395 | #endif /* CONFIG_TRANSPARENT_HUGEPAGE */ | 1392 | #endif /* CONFIG_TRANSPARENT_HUGEPAGE */ |
1396 | 1393 | ||