csky: drop definition of PGD_ORDER
authorMike Rapoport <rppt@linux.ibm.com>
Sun, 3 Jul 2022 14:11:51 +0000 (17:11 +0300)
committerakpm <akpm@linux-foundation.org>
Mon, 18 Jul 2022 00:14:42 +0000 (17:14 -0700)
This is the order of the page table allocation, not the order of a PGD.
Since its always hardwired to 0, simply drop it.

Link: https://lkml.kernel.org/r/20220703141203.147893-3-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/csky/include/asm/pgalloc.h
arch/csky/include/asm/pgtable.h

index bbbd0698b3972909d1b2aee8db105cff938be9f0..7d57e5da091464a7de50c95495201dadf9301218 100644 (file)
@@ -44,7 +44,7 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm)
        pgd_t *ret;
        pgd_t *init;
 
-       ret = (pgd_t *) __get_free_pages(GFP_KERNEL, PGD_ORDER);
+       ret = (pgd_t *) __get_free_page(GFP_KERNEL);
        if (ret) {
                init = pgd_offset(&init_mm, 0UL);
                pgd_init((unsigned long *)ret);
index 349e03dfb9baed90dd3c6224daeb3d10dd2da6a5..c3d9b92cbe61c81d030eda9cfe1d968fe10d4050 100644 (file)
@@ -18,9 +18,8 @@
 /*
  * C-SKY is two-level paging structure:
  */
-#define PGD_ORDER      0
 
-#define PTRS_PER_PGD   ((PAGE_SIZE << PGD_ORDER) / sizeof(pgd_t))
+#define PTRS_PER_PGD   (PAGE_SIZE / sizeof(pgd_t))
 #define PTRS_PER_PMD   1
 #define PTRS_PER_PTE   (PAGE_SIZE / sizeof(pte_t))