diff options
author | Gerald Schaefer <gerald.schaefer@de.ibm.com> | 2012-10-25 11:24:12 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2012-10-26 10:44:23 -0400 |
commit | 156152f84e57bff4d9b5d70be6f3f16116bf6fb1 (patch) | |
tree | b34c630d1af92e327a1224061c975d21b12384c4 /arch/s390 | |
parent | 31370f75de4b641f47204899549d2a533cd42738 (diff) |
s390/mm: use pmd_large() instead of pmd_huge()
Without CONFIG_HUGETLB_PAGE, pmd_huge() will always return 0. So
pmd_large() should be used instead in places where both transparent
huge pages and hugetlbfs pages can occur.
Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/lib/uaccess_pt.c | 2 | ||||
-rw-r--r-- | arch/s390/mm/gup.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/lib/uaccess_pt.c b/arch/s390/lib/uaccess_pt.c index 2d37bb861faf..9017a63dda3d 100644 --- a/arch/s390/lib/uaccess_pt.c +++ b/arch/s390/lib/uaccess_pt.c | |||
@@ -39,7 +39,7 @@ static __always_inline unsigned long follow_table(struct mm_struct *mm, | |||
39 | pmd = pmd_offset(pud, addr); | 39 | pmd = pmd_offset(pud, addr); |
40 | if (pmd_none(*pmd)) | 40 | if (pmd_none(*pmd)) |
41 | return -0x10UL; | 41 | return -0x10UL; |
42 | if (pmd_huge(*pmd)) { | 42 | if (pmd_large(*pmd)) { |
43 | if (write && (pmd_val(*pmd) & _SEGMENT_ENTRY_RO)) | 43 | if (write && (pmd_val(*pmd) & _SEGMENT_ENTRY_RO)) |
44 | return -0x04UL; | 44 | return -0x04UL; |
45 | return (pmd_val(*pmd) & HPAGE_MASK) + (addr & ~HPAGE_MASK); | 45 | return (pmd_val(*pmd) & HPAGE_MASK) + (addr & ~HPAGE_MASK); |
diff --git a/arch/s390/mm/gup.c b/arch/s390/mm/gup.c index 60acb93a4680..8b8285310b5a 100644 --- a/arch/s390/mm/gup.c +++ b/arch/s390/mm/gup.c | |||
@@ -126,7 +126,7 @@ static inline int gup_pmd_range(pud_t *pudp, pud_t pud, unsigned long addr, | |||
126 | */ | 126 | */ |
127 | if (pmd_none(pmd) || pmd_trans_splitting(pmd)) | 127 | if (pmd_none(pmd) || pmd_trans_splitting(pmd)) |
128 | return 0; | 128 | return 0; |
129 | if (unlikely(pmd_huge(pmd))) { | 129 | if (unlikely(pmd_large(pmd))) { |
130 | if (!gup_huge_pmd(pmdp, pmd, addr, next, | 130 | if (!gup_huge_pmd(pmdp, pmd, addr, next, |
131 | write, pages, nr)) | 131 | write, pages, nr)) |
132 | return 0; | 132 | return 0; |