um: convert {pmd, pte}_free_tlb() to use ptdescs
authorVishal Moola (Oracle) <vishal.moola@gmail.com>
Mon, 7 Aug 2023 23:05:12 +0000 (16:05 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 21 Aug 2023 20:37:58 +0000 (13:37 -0700)
Part of the conversions to replace pgtable constructor/destructors with
ptdesc equivalents.  Also cleans up some spacing issues.

Link: https://lkml.kernel.org/r/20230807230513.102486-31-vishal.moola@gmail.com
Signed-off-by: Vishal Moola (Oracle) <vishal.moola@gmail.com>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Claudio Imbrenda <imbrenda@linux.ibm.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Dinh Nguyen <dinguyen@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Guo Ren <guoren@kernel.org>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Palmer Dabbelt <palmer@rivosinc.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/um/include/asm/pgalloc.h

index 8ec7cd4..de5e31c 100644 (file)
  */
 extern pgd_t *pgd_alloc(struct mm_struct *);
 
-#define __pte_free_tlb(tlb,pte, address)               \
-do {                                                   \
-       pgtable_pte_page_dtor(pte);                     \
-       tlb_remove_page((tlb),(pte));                   \
+#define __pte_free_tlb(tlb, pte, address)                      \
+do {                                                           \
+       pagetable_pte_dtor(page_ptdesc(pte));                   \
+       tlb_remove_page_ptdesc((tlb), (page_ptdesc(pte)));      \
 } while (0)
 
 #ifdef CONFIG_3_LEVEL_PGTABLES
 
-#define __pmd_free_tlb(tlb, pmd, address)              \
-do {                                                   \
-       pgtable_pmd_page_dtor(virt_to_page(pmd));       \
-       tlb_remove_page((tlb),virt_to_page(pmd));       \
-} while (0)                                            \
+#define __pmd_free_tlb(tlb, pmd, address)                      \
+do {                                                           \
+       pagetable_pmd_dtor(virt_to_ptdesc(pmd));                        \
+       tlb_remove_page_ptdesc((tlb), virt_to_ptdesc(pmd));     \
+} while (0)
 
 #endif