]> git.baikalelectronics.ru Git - kernel.git/commitdiff
parisc: rename PGD_ORDER to PGD_TABLE_ORDER
authorMike Rapoport <rppt@linux.ibm.com>
Sun, 3 Jul 2022 14:12:02 +0000 (17:12 +0300)
committerakpm <akpm@linux-foundation.org>
Mon, 18 Jul 2022 00:14:43 +0000 (17:14 -0700)
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.org
Signed-off-by: Mike 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: Andrew Morton <akpm@linux-foundation.org>
arch/parisc/include/asm/pgalloc.h
arch/parisc/include/asm/pgtable.h

index 54b63374579b3e57065b8f255aa4b66be2b50599..e3e142b1c5c5f5cb633ef3a2b1e74c83b17e4c56 100644 (file)
@@ -20,18 +20,18 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm)
 {
        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))
                return NULL;
 
-       memset(pgd, 0, PAGE_SIZE << PGD_ORDER);
+       memset(pgd, 0, PAGE_SIZE << PGD_TABLE_ORDER);
 
        return 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
index 6a1899a9b42003904feecc199c535e3fe5f5a82a..df7b931865d224fe42c3f12dfee9d947f4d0ee8b 100644 (file)
@@ -118,9 +118,9 @@ extern void __update_cache(pte_t pte);
 
 #if CONFIG_PGTABLE_LEVELS == 3
 #define PMD_TABLE_ORDER        1
-#define PGD_ORDER      0
+#define PGD_TABLE_ORDER        0
 #else
-#define PGD_ORDER      1
+#define PGD_TABLE_ORDER        1
 #endif
 
 /* Definitions for 3rd level (we use PLD here for Page Lower directory
@@ -144,10 +144,10 @@ extern void __update_cache(pte_t pte);
 
 /* Definitions for 1st level */
 #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)
 #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
 #define PGDIR_SIZE     (1UL << PGDIR_SHIFT)
 #define PGDIR_MASK     (~(PGDIR_SIZE-1))