From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 441B240C5D0 for ; Mon, 18 May 2026 12:33:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779107622; cv=none; b=EQ6QwRhS/AJWoafzEhNraT4z4NBAeZTw7sm2/heF3W7zT3jpkV8OThzcmnH2Xx37gojh9K8SUd4rRqcWG0y5KmqMJ+QiqwwcHCIPnq+sbheh+Y07NZSMq5BcLjJFbX6tkL4vojbEPK3Q7aJxTUqGFH2XXh7YT61DMFcvP9lUles= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779107622; c=relaxed/simple; bh=qIjsom9bZAoeQ2Rimjo1anVHtnBVcomhLRxGciBa02g=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HM7UEMsTCZWw3mOi8dbC5pbZKQRnS2Wd7SMtbs2+++om3Yy8lLIb/gEk2yHEZ0BUt+zAUTeAa1TayJfel+d/af5/p77fFsmMSGvpv66l+BPPEjmOC2ko15XHPnUHZ7l7wlSvbyw1P1R+iLx4LBFPPYvgmNEpq6hQdmJABg3Iwp0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Z8b61GTy; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Z8b61GTy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 534A8C2BCB8; Mon, 18 May 2026 12:33:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1779107622; bh=qIjsom9bZAoeQ2Rimjo1anVHtnBVcomhLRxGciBa02g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Z8b61GTy309/yJnxtCMygQx8FAFBnbAxOTCJnUyDA8aXCcdyuzNpmHwTv07a3OI9+ 6xuBseVGr5BvXOLWpporsekZHIMbfbyM8ZCGvi384cKn+p5YugQmz56hKj0ANeQ+dX qpkIUHbT0p2dGN5X2hYXHK/wAmAobBwyVSeM5rXpjFmirmZhvcsxr+4twg6uLyvFYj hLOqcTXtA9o07kpvFUr1ZAz8Yq4bugXRZ4XAAGm3KU1FtWOodpm42+X7xJfJet9042 ToizkHaqW/ossLM1jwrTaugoWzcN+vqKyH+j8mnUPVXuQTQvzZBahfm0D2L8RLP7J1 nr4YHHMSi7znA== Date: Mon, 18 May 2026 13:33:36 +0100 From: Will Deacon To: Muchun Song Cc: Catalin Marinas , linux-mm@kvack.org, akpm@linux-foundation.org, Muchun Song , Ryan Roberts , David Hildenbrand , Kevin Brodsky , Dev Jain , Lorenzo Stoakes , Anshuman Khandual , Yang Shi , Chaitanya S Prakash , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/5] arm64/mm: drop vmemmap_pmd helpers and use generic code Message-ID: References: <20260404122105.3989557-1-songmuchun@bytedance.com> <20260404122105.3989557-3-songmuchun@bytedance.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260404122105.3989557-3-songmuchun@bytedance.com> On Sat, Apr 04, 2026 at 08:20:55PM +0800, Muchun Song wrote: > The generic implementations now suffice; remove the arm64 copies. > > Signed-off-by: Muchun Song > --- > arch/arm64/mm/mmu.c | 14 -------------- > 1 file changed, 14 deletions(-) > > diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c > index ec1c6971a561..b87053452641 100644 > --- a/arch/arm64/mm/mmu.c > +++ b/arch/arm64/mm/mmu.c > @@ -1745,20 +1745,6 @@ static void free_empty_tables(unsigned long addr, unsigned long end, > } > #endif > > -void __meminit vmemmap_set_pmd(pmd_t *pmdp, void *p, int node, > - unsigned long addr, unsigned long next) > -{ > - pmd_set_huge(pmdp, __pa(p), __pgprot(PROT_SECT_NORMAL)); > -} > - > -int __meminit vmemmap_check_pmd(pmd_t *pmdp, int node, > - unsigned long addr, unsigned long next) > -{ > - vmemmap_verify((pte_t *)pmdp, node, addr, next); > - > - return pmd_sect(READ_ONCE(*pmdp)); > -} I think this is fine: Acked-by: Will Deacon but note that, since c25c4aa3f79a ("arm64: mm: Add PTE_DIRTY back to PAGE_KERNEL* to fix kexec/hibernation"), I think that using PAGE_KERNEL (like the generic code does in the first patch of this series) means that this change isn't a no-op -- it means that the huge entries will now be marked as dirty. That's possibly a bug fix (?) Will