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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 65844C5DF71 for ; Tue, 2 Jun 2026 04:41:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=5iTAXR5bbzIxHxlJbNzCQ0CqrWCPbLprw+Rivi0AdWo=; b=ZxQy5FTBnqFEZz+Wd1E1KyAgtO pjYweQ+7+T//l0D8OVl45sWbEW1g2PGGtSlMzJwQBybSm6z+aKh+lMdXlyLVamoU3Cf8pY7k1lduv p7PAt6cZU2YFUAVmG9mDbPZwQoA0duyV24QeUNTYjzM1SUobhfAvt9rKKRjj19rkTeHwCiTMSl6ay MdpMxHJAaIuQu+tUZQGg3d849/GHWcunYV7MgHqiEM0cFWTiczm3Ml7TwKAwFN7QgpJBj0PCQ8eYv HfrY7uFlvFpWPk2kUnJCixUNT0nlTFk5C4lqcFiysDDWaAqM3CM5ohKr0/xFDigHx13lJJnz3j003 Rl4GZ8Bg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wUGwQ-0000000CHgt-1p1h; Tue, 02 Jun 2026 04:41:26 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wUGwN-0000000CHg2-370o; Tue, 02 Jun 2026 04:41:24 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id E6D4E42A7B; Tue, 2 Jun 2026 04:41:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 227081F00893; Tue, 2 Jun 2026 04:41:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1780375282; bh=5iTAXR5bbzIxHxlJbNzCQ0CqrWCPbLprw+Rivi0AdWo=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=fVVCf76Dx7vvRtOjppgGy1UPYStuohI+uy9DWtC+LjMgaEMLbdvFewnh94OAL+CM2 pCOKO3Nnfhfp4QVVVFHJ7pGlC0pcRPQSBoK+8qI+lMS8vE1L9za9TMoAEhapGCyg9z oSOX6UXAQ0qI8lZdcWzGnsDHIE/3SlXVTvbbZnLLGgJsb+q9w7gAY3CfUe/oXsaq3F IKCnC0jDUA164OuR9mISVXoVORX5ONpBDuDwwi+L6+sBtk7/0MupCBLirVc0R3mesL YLqI48YwygT3VSDU6XtM8NAwITqzxDNVTMAKliil4c0o+GhGmZTerIkNtW6sdsl3Fh evYO5/MHJ+rmg== Date: Tue, 2 Jun 2026 06:41:14 +0200 From: "Oscar Salvador (SUSE)" To: Muchun Song Cc: Andrew Morton , David Hildenbrand , Catalin Marinas , Will Deacon , Palmer Dabbelt , Paul Walmsley , Huacai Chen , Andreas Larsson , "David S. Miller" , Muchun Song , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, loongarch@lists.linux.dev, sparclinux@vger.kernel.org, Alexandre Ghiti , Albert Ou , WANG Xuerui , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko Subject: Re: [PATCH v3 1/5] mm/sparse-vmemmap: provide generic vmemmap_set_pmd() and vmemmap_check_pmd() Message-ID: References: <20260601084845.3792171-1-songmuchun@bytedance.com> <20260601084845.3792171-2-songmuchun@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260601084845.3792171-2-songmuchun@bytedance.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260601_214123_802706_A60FF950 X-CRM114-Status: GOOD ( 10.30 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jun 01, 2026 at 04:48:40PM +0800, Muchun Song wrote: > The two weak functions are currently no-ops on every architecture, > forcing each platform that needs them to duplicate the same handful > of lines. Provide a generic implementation: > > - vmemmap_set_pmd() simply sets a huge PMD with PAGE_KERNEL protection. > > - vmemmap_check_pmd() verifies that the PMD is present and leaf, > then calls the existing vmemmap_verify() helper. > > Architectures that need special handling can continue to override the > weak symbols; everyone else gets the standard version for free. > > Signed-off-by: Muchun Song Acked-by: Oscar Salvador (SUSE) -- Oscar Salvador SUSE Labs