From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-173.mta1.migadu.com (out-173.mta1.migadu.com [95.215.58.173]) (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 2CDC739A051 for ; Tue, 19 May 2026 06:16:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779171390; cv=none; b=sNxxnpUaWc03/DtEh79m5nyRdqwyjtSvjiIr+mInnuqTTmZ5Q9F4lFgVxCC7FliZC283uSBJY7X6uiebtGOVj/d2IwZtdeNcPFPmxc1R7rLOG74No2A3UXCaKLd/nKSeU71yNLjCkPjGaOb3nhYwR+JT25KuWIiOyc1KT3+rLWs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779171390; c=relaxed/simple; bh=NyuaQDqvg5X1huH9BBITx+zUVvnc5BuCzsyqKLFQy8I=; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc: Message-Id:References:To; b=US2/HJ6HnnYOgBs1QOvstX6UfkA5DuMOFSIzNS44R4Mw2g6jJqt1LhCQOJrG9rLLeXQ0OJRZ1/aT7ZHkeo0jy3/4ZkQblCQK3oDJZyk2E0CJgsb0cGjGn3oGjmFytDI/RDZeIBC5qqf6d9euGasa1dBB9fAR5lMNG8O0VaBTmP4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=JNdTU86E; arc=none smtp.client-ip=95.215.58.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="JNdTU86E" Content-Type: text/plain; charset=us-ascii DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1779171385; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=B0Ldfqr2ngs4tUVmrZGR8IuA8f+j0qWTUw7Wa6Derco=; b=JNdTU86E7+9dgnEn/PyWB0Xi+hyY1F6UY7TXyMSJfQLBsJ5pgSSpGBUQt+sRbSeRDxbN0g YOmNImEkcvjwgHrhmUbS7A3//04gNtd84ukEHxFJLWq3/3HR0azT407rB2InuAWofz5Vie Ap+q313Af6Hx0+KVWHon9fPAtTjoykw= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.500.181\)) Subject: Re: [PATCH v2 2/5] arm64/mm: drop vmemmap_pmd helpers and use generic code X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Muchun Song In-Reply-To: Date: Tue, 19 May 2026 14:15:32 +0800 Cc: Muchun Song , Catalin Marinas , linux-mm@kvack.org, akpm@linux-foundation.org, 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 Content-Transfer-Encoding: quoted-printable Message-Id: <93852370-3D0E-4C0F-8F63-B3EF57977E59@linux.dev> References: <20260404122105.3989557-1-songmuchun@bytedance.com> <20260404122105.3989557-3-songmuchun@bytedance.com> To: Will Deacon X-Migadu-Flow: FLOW_OUT > On May 18, 2026, at 20:33, Will Deacon wrote: >=20 > On Sat, Apr 04, 2026 at 08:20:55PM +0800, Muchun Song wrote: >> The generic implementations now suffice; remove the arm64 copies. >>=20 >> Signed-off-by: Muchun Song >> --- >> arch/arm64/mm/mmu.c | 14 -------------- >> 1 file changed, 14 deletions(-) >>=20 >> 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 >>=20 >> -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)); >> -} >=20 > I think this is fine: >=20 > Acked-by: Will Deacon Thanks. >=20 > 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 (?) I think you are right. We should mark kernel mapping as dirty. Thanks, Muchun >=20 > Will