Skip to content

Commit c19edb6

Browse files
groeckhdeller
authored andcommitted
parisc: Replace PT_NLEVELS with CONFIG_PGTABLE_LEVELS
The following warning is seen when compiling parisc images ./arch/parisc/include/asm/pgalloc.h: In function 'pgd_alloc': ./arch/parisc/include/asm/pgalloc.h:29:5: warning: "PT_NLEVELS" is not defined Some definitions of PT_NLEVELS were missed with the conversion to CONFIG_PGTABLE_LEVELS. Fixes: f24ffde ("parisc: expose number of page table levels on Kconfig level") Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Helge Deller <deller@gmx.de>
1 parent 8bf8a1d commit c19edb6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎arch/parisc/include/asm/pgalloc.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm)
2626

2727
if (likely(pgd != NULL)) {
2828
memset(pgd, 0, PAGE_SIZE<<PGD_ALLOC_ORDER);
29-
#if PT_NLEVELS == 3
29+
#if CONFIG_PGTABLE_LEVELS == 3
3030
actual_pgd += PTRS_PER_PGD;
3131
/* Populate first pmd with allocated memory. We mark it
3232
* with PxD_FLAG_ATTACHED as a signal to the system that this
@@ -45,7 +45,7 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm)
4545

4646
static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
4747
{
48-
#if PT_NLEVELS == 3
48+
#if CONFIG_PGTABLE_LEVELS == 3
4949
pgd -= PTRS_PER_PGD;
5050
#endif
5151
free_pages((unsigned long)pgd, PGD_ALLOC_ORDER);
@@ -102,7 +102,7 @@ static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
102102
static inline void
103103
pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte)
104104
{
105-
#if PT_NLEVELS == 3
105+
#if CONFIG_PGTABLE_LEVELS == 3
106106
/* preserve the gateway marker if this is the beginning of
107107
* the permanent pmd */
108108
if(pmd_flag(*pmd) & PxD_FLAG_ATTACHED)

0 commit comments

Comments
 (0)