From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45381C77B7F for ; Sat, 6 May 2023 11:35:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AD3A96B0072; Sat, 6 May 2023 07:35:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A83CA6B0078; Sat, 6 May 2023 07:35:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 972A36B007B; Sat, 6 May 2023 07:35:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by kanga.kvack.org (Postfix) with ESMTP id 715806B0072 for ; Sat, 6 May 2023 07:35:53 -0400 (EDT) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost.zedat.fu-berlin.de (Exim 4.95) with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (envelope-from ) id 1pvGCa-002hVY-AY; Sat, 06 May 2023 13:35:48 +0200 Received: from p57bd9cee.dip0.t-ipconnect.de ([87.189.156.238] helo=suse-laptop.fritz.box) by inpost2.zedat.fu-berlin.de (Exim 4.95) with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (envelope-from ) id 1pvGCZ-000Sf9-Vs; Sat, 06 May 2023 13:35:48 +0200 Message-ID: Subject: Re: [PATCH v2 30/34] sh: Convert pte_free_tlb() to use ptdescs From: John Paul Adrian Glaubitz To: "Vishal Moola (Oracle)" , Andrew Morton , Matthew Wilcox Cc: linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, loongarch@lists.linux.dev, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-openrisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-um@lists.infradead.org, xen-devel@lists.xenproject.org, kvm@vger.kernel.org, Yoshinori Sato Date: Sat, 06 May 2023 13:35:46 +0200 In-Reply-To: <20230501192829.17086-31-vishal.moola@gmail.com> References: <20230501192829.17086-1-vishal.moola@gmail.com> <20230501192829.17086-31-vishal.moola@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.1 MIME-Version: 1.0 X-Original-Sender: glaubitz@physik.fu-berlin.de X-Originating-IP: 87.189.156.238 X-ZEDAT-Hint: PO X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi Vishal! On Mon, 2023-05-01 at 12:28 -0700, Vishal Moola (Oracle) wrote: > Part of the conversions to replace pgtable constructor/destructors with > ptdesc equivalents. Also cleans up some spacing issues. >=20 > Signed-off-by: Vishal Moola (Oracle) > --- > arch/sh/include/asm/pgalloc.h | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) >=20 > diff --git a/arch/sh/include/asm/pgalloc.h b/arch/sh/include/asm/pgalloc.= h > index a9e98233c4d4..ce2ba99dbd84 100644 > --- a/arch/sh/include/asm/pgalloc.h > +++ b/arch/sh/include/asm/pgalloc.h > @@ -2,6 +2,7 @@ > #ifndef __ASM_SH_PGALLOC_H > #define __ASM_SH_PGALLOC_H > =20 > +#include > #include > =20 > #define __HAVE_ARCH_PMD_ALLOC_ONE > @@ -31,10 +32,10 @@ static inline void pmd_populate(struct mm_struct *mm,= pmd_t *pmd, > set_pmd(pmd, __pmd((unsigned long)page_address(pte))); > } > =20 > -#define __pte_free_tlb(tlb,pte,addr) \ > -do { \ > - pgtable_pte_page_dtor(pte); \ > - tlb_remove_page((tlb), (pte)); \ > +#define __pte_free_tlb(tlb, pte, addr) \ > +do { \ > + ptdesc_pte_dtor(page_ptdesc(pte)); \ > + tlb_remove_page_ptdesc((tlb), (page_ptdesc(pte))); \ > } while (0) > =20 > #endif /* __ASM_SH_PGALLOC_H */ Looking at the patch which introduces tlb_remove_page_ptdesc() [1], it seem= s that tlb_remove_page_ptdesc() already calls tlb_remove_page() with ptdesc_page(p= t), so I'm not sure whether the above tlb_remove_page_ptdesc((tlb), (page_ptdesc(p= te))) is correct. Shouldn't it just be tlb_remove_page_ptdesc((tlb), (pte))? Thanks, Adrian > [1] https://lore.kernel.org/linux-mm/20230417205048.15870-5-vishal.moola@= gmail.com/ --=20 .''`. John Paul Adrian Glaubitz : :' : Debian Developer `. `' Physicist `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913