Commit 4501a7a0 authored by Mike Rapoport's avatar Mike Rapoport Committed by akpm

parisc: rename PGD_ORDER to PGD_TABLE_ORDER

This is the order of the page table allocation, not the order of a PGD.

Link: https://lkml.kernel.org/r/20220703141203.147893-14-rppt@kernel.orgSigned-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Dinh Nguyen <dinguyen@kernel.org>
Cc: Guo Ren <guoren@kernel.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Xuerui Wang <kernel@xen0n.name>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 418d5dad
...@@ -20,18 +20,18 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm) ...@@ -20,18 +20,18 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm)
{ {
pgd_t *pgd; pgd_t *pgd;
pgd = (pgd_t *) __get_free_pages(GFP_KERNEL, PGD_ORDER); pgd = (pgd_t *) __get_free_pages(GFP_KERNEL, PGD_TABLE_ORDER);
if (unlikely(pgd == NULL)) if (unlikely(pgd == NULL))
return NULL; return NULL;
memset(pgd, 0, PAGE_SIZE << PGD_ORDER); memset(pgd, 0, PAGE_SIZE << PGD_TABLE_ORDER);
return pgd; return pgd;
} }
static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
{ {
free_pages((unsigned long)pgd, PGD_ORDER); free_pages((unsigned long)pgd, PGD_TABLE_ORDER);
} }
#if CONFIG_PGTABLE_LEVELS == 3 #if CONFIG_PGTABLE_LEVELS == 3
......
...@@ -118,9 +118,9 @@ extern void __update_cache(pte_t pte); ...@@ -118,9 +118,9 @@ extern void __update_cache(pte_t pte);
#if CONFIG_PGTABLE_LEVELS == 3 #if CONFIG_PGTABLE_LEVELS == 3
#define PMD_TABLE_ORDER 1 #define PMD_TABLE_ORDER 1
#define PGD_ORDER 0 #define PGD_TABLE_ORDER 0
#else #else
#define PGD_ORDER 1 #define PGD_TABLE_ORDER 1
#endif #endif
/* Definitions for 3rd level (we use PLD here for Page Lower directory /* Definitions for 3rd level (we use PLD here for Page Lower directory
...@@ -144,10 +144,10 @@ extern void __update_cache(pte_t pte); ...@@ -144,10 +144,10 @@ extern void __update_cache(pte_t pte);
/* Definitions for 1st level */ /* Definitions for 1st level */
#define PGDIR_SHIFT (PLD_SHIFT + BITS_PER_PTE + BITS_PER_PMD) #define PGDIR_SHIFT (PLD_SHIFT + BITS_PER_PTE + BITS_PER_PMD)
#if (PGDIR_SHIFT + PAGE_SHIFT + PGD_ORDER - BITS_PER_PGD_ENTRY) > BITS_PER_LONG #if (PGDIR_SHIFT + PAGE_SHIFT + PGD_TABLE_ORDER - BITS_PER_PGD_ENTRY) > BITS_PER_LONG
#define BITS_PER_PGD (BITS_PER_LONG - PGDIR_SHIFT) #define BITS_PER_PGD (BITS_PER_LONG - PGDIR_SHIFT)
#else #else
#define BITS_PER_PGD (PAGE_SHIFT + PGD_ORDER - BITS_PER_PGD_ENTRY) #define BITS_PER_PGD (PAGE_SHIFT + PGD_TABLE_ORDER - BITS_PER_PGD_ENTRY)
#endif #endif
#define PGDIR_SIZE (1UL << PGDIR_SHIFT) #define PGDIR_SIZE (1UL << PGDIR_SHIFT)
#define PGDIR_MASK (~(PGDIR_SIZE-1)) #define PGDIR_MASK (~(PGDIR_SIZE-1))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment