Skip to content

Commit 9477102

Browse files
kevin-brodsky-armakpm00
authored andcommitted
ARM: mm: rename PGD helpers
Generic implementations of __pgd_alloc and __pgd_free are about to be introduced. Rename the macros in arch/arm/mm/pgd.c to avoid clashes. While we're at it, also pass down the mm as argument to those helpers, as it will be needed to call the generic __pgd_{alloc,free}. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Kevin Brodsky <[email protected]> Acked-by: Dave Hansen <[email protected]> Acked-by: Qi Zheng <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Linus Walleij <[email protected]> Cc: Matthew Wilcox (Oracle) <[email protected]> Cc: Mike Rapoport (Microsoft) <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Ryan Roberts <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Will Deacon <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 1879688 commit 9477102

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

arch/arm/mm/pgd.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
#include "mm.h"
1818

1919
#ifdef CONFIG_ARM_LPAE
20-
#define __pgd_alloc() kmalloc_array(PTRS_PER_PGD, sizeof(pgd_t), GFP_KERNEL)
21-
#define __pgd_free(pgd) kfree(pgd)
20+
#define _pgd_alloc(mm) kmalloc_array(PTRS_PER_PGD, sizeof(pgd_t), GFP_KERNEL)
21+
#define _pgd_free(mm, pgd) kfree(pgd)
2222
#else
23-
#define __pgd_alloc() (pgd_t *)__get_free_pages(GFP_KERNEL, 2)
24-
#define __pgd_free(pgd) free_pages((unsigned long)pgd, 2)
23+
#define _pgd_alloc(mm) (pgd_t *)__get_free_pages(GFP_KERNEL, 2)
24+
#define _pgd_free(mm, pgd) free_pages((unsigned long)pgd, 2)
2525
#endif
2626

2727
/*
@@ -35,7 +35,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
3535
pmd_t *new_pmd, *init_pmd;
3636
pte_t *new_pte, *init_pte;
3737

38-
new_pgd = __pgd_alloc();
38+
new_pgd = _pgd_alloc(mm);
3939
if (!new_pgd)
4040
goto no_pgd;
4141

@@ -134,7 +134,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
134134
no_pud:
135135
p4d_free(mm, new_p4d);
136136
no_p4d:
137-
__pgd_free(new_pgd);
137+
_pgd_free(mm, new_pgd);
138138
no_pgd:
139139
return NULL;
140140
}
@@ -207,5 +207,5 @@ void pgd_free(struct mm_struct *mm, pgd_t *pgd_base)
207207
p4d_free(mm, p4d);
208208
}
209209
#endif
210-
__pgd_free(pgd_base);
210+
_pgd_free(mm, pgd_base);
211211
}

0 commit comments

Comments
 (0)