Skip to content

Commit 2fa245c

Browse files
hdellertorvalds
authored andcommitted
parisc/hugetlb: use pgtable-nopXd instead of 4level-fixup
Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Helge Deller <[email protected]> Signed-off-by: Mike Rapoport <[email protected]> Cc: Anatoly Pugachev <[email protected]> Cc: Anton Ivanov <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Greentime Hu <[email protected]> Cc: Greg Ungerer <[email protected]> Cc: "James E.J. Bottomley" <[email protected]> Cc: Jeff Dike <[email protected]> Cc: "Kirill A. Shutemov" <[email protected]> Cc: Mark Salter <[email protected]> Cc: Matt Turner <[email protected]> Cc: Michal Simek <[email protected]> Cc: Peter Rosin <[email protected]> Cc: Richard Weinberger <[email protected]> Cc: Rolf Eike Beer <[email protected]> Cc: Russell King <[email protected]> Cc: Russell King <[email protected]> Cc: Sam Creasey <[email protected]> Cc: Vincent Chen <[email protected]> Cc: Vineet Gupta <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent d96885e commit 2fa245c

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

arch/parisc/mm/hugetlbpage.c

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ pte_t *huge_pte_alloc(struct mm_struct *mm,
4949
unsigned long addr, unsigned long sz)
5050
{
5151
pgd_t *pgd;
52+
p4d_t *p4d;
5253
pud_t *pud;
5354
pmd_t *pmd;
5455
pte_t *pte = NULL;
@@ -61,7 +62,8 @@ pte_t *huge_pte_alloc(struct mm_struct *mm,
6162
addr &= HPAGE_MASK;
6263

6364
pgd = pgd_offset(mm, addr);
64-
pud = pud_alloc(mm, pgd, addr);
65+
p4d = p4d_offset(pgd, addr);
66+
pud = pud_alloc(mm, p4d, addr);
6567
if (pud) {
6668
pmd = pmd_alloc(mm, pud, addr);
6769
if (pmd)
@@ -74,6 +76,7 @@ pte_t *huge_pte_offset(struct mm_struct *mm,
7476
unsigned long addr, unsigned long sz)
7577
{
7678
pgd_t *pgd;
79+
p4d_t *p4d;
7780
pud_t *pud;
7881
pmd_t *pmd;
7982
pte_t *pte = NULL;
@@ -82,11 +85,14 @@ pte_t *huge_pte_offset(struct mm_struct *mm,
8285

8386
pgd = pgd_offset(mm, addr);
8487
if (!pgd_none(*pgd)) {
85-
pud = pud_offset(pgd, addr);
86-
if (!pud_none(*pud)) {
87-
pmd = pmd_offset(pud, addr);
88-
if (!pmd_none(*pmd))
89-
pte = pte_offset_map(pmd, addr);
88+
p4d = p4d_offset(pgd, addr);
89+
if (!p4d_none(*p4d)) {
90+
pud = pud_offset(p4d, addr);
91+
if (!pud_none(*pud)) {
92+
pmd = pmd_offset(pud, addr);
93+
if (!pmd_none(*pmd))
94+
pte = pte_offset_map(pmd, addr);
95+
}
9096
}
9197
}
9298
return pte;

0 commit comments

Comments
 (0)