From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0774629A9C8 for ; Sat, 4 Apr 2026 12:21:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775305296; cv=none; b=EDfUtwvZEOCWeQAp5P1hOY1hlWSzMqX60Jy1ijAewncKLH47hEQg6OD1s3nmiBDMJ6r62qXqYXyu/h3duaSoS6u9j2HLWdlmdkOp3DFjtel4bn3z6k/Wp+nPs+aAjhK565nD9tbkReDD98xgGfWcwgiqceULgS17Su/DO8jQlC8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775305296; c=relaxed/simple; bh=9CZ97JT+kenh3dMWB7Kd1lSj1XwX+Km3X9BL4xEVA6E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=OdCqfBQDhiZ/XElLF1ApTP0HKbhc8JDHifPfD6X0Ulx0FUxvEC7RqfqAbXlwa2XpDcLhDd+VArMHdser1sYO31/crHck4RbbD3DF6qtKNKgFwcd/kMPfPzJ4edlitbu8xD4RRkyiykHYzvFE+mQ8m5qtvkTDof1nC/i8lRcRVis= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=aV8jvmb5; arc=none smtp.client-ip=209.85.215.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="aV8jvmb5" Received: by mail-pg1-f178.google.com with SMTP id 41be03b00d2f7-c70fb6aa323so905725a12.3 for ; Sat, 04 Apr 2026 05:21:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1775305294; x=1775910094; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qxbGgf4+lSuSxIXzDbxhYHMBptayAf1Wj0PvoCJF+ME=; b=aV8jvmb5G9d93WeQxULUdabZQpBF9AvB9PHhreGpo5se2AYsBRaA7QH8jT584T6L6s OA8M4j/Nx66aMObuIbz/MFA4pH0iG/bOA8jE1ctkhoeTxPeftfi9+UnY7iAxOrXKrr+S Qyos6gub969tFosfQSYpG1P3Jt3MGBw+jXnTXkSnw1We5yRhCN78kkVaABREpVUvaSFd C32ifjhyBzGJ53p8m1jcuh4S35xJgHuNEP0cMxAiVJyoJkhF23ni2OJZ2nwFFH6jSYex fDJcKFlK1/VgjY0+r7QaIzfy0wTCKbQabMmAMZTQnT7iKgln4nSATS2eKiYErVEiZ/zh hCWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775305294; x=1775910094; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=qxbGgf4+lSuSxIXzDbxhYHMBptayAf1Wj0PvoCJF+ME=; b=Zl/3AFn/fgfXnZgJXwOaxs15FJzB9qAh45h5eGOWxderbtwhvSao8IPyLN9i/wso29 P/6pzj2fC4+fpjo+0Ey/RBWiNuqRmnr0JteF47x+dnlldviNui1jjt//Llsty6ZJPqlx bX1r62nWC3Ab2mjZ/8ShkJS8sHvRi3IYCb0BG3clVCm+/uXgJ4rkhHKXK6MuN0iyyl+o JE5AcW3k7nd6phm8zi16m+YAyPj0g0Q56G0WWymT1AHpl4PJBdj6/+9nPuQaXiM5txjc gMPfGz0PcGLzbcgviqd7Dx0AGux/rkhDB77slE89gDpDATEtcukEQER9AsOuiBZ7OrPv YMzw== X-Forwarded-Encrypted: i=1; AJvYcCUtgDljr7vV41cTqARGXA5dX5fRiy8bntHCfa8eRHAHkJI5ObInnDzcaIffQd4Pg2iUIv4vZzCK35qY6AY=@vger.kernel.org X-Gm-Message-State: AOJu0YxoR6kS3ocbEcrUxv903iLtlJBTHyNl/IWzx7us/9jjEFSvy8P8 Ad93L3qparCDOXsKS4HjG2gdW4Icf75kuXgf+EuSOAzGLYQwXEmb3prqqM3ePlWcqek= X-Gm-Gg: AeBDietc3aVqjpIM7KqEDBTWwBi4XNoE0EI7IWzFfqmKvPwUGiF/+I96h7y8/94yTMa yq2MxaWaJOu//lk/LFtetV01GjtFXAIaPsQcH48shxaV5LOxbGS+aqprJEBwkIPM9sm+BEeWNUg HZXbgfAeYdPxDGDl2CsRixEgDCgDGfOg4+m8ZNXvDWaYWWmVpXJ7HcMlQAZSjX4fuLR6PzIgV/9 xLn5YeXqujclF7foNPYMohZYbhbXUlBxF3Fpz2P3NNXIHGI975Rrh2wHi+ht0wCBYTucnZiujPY vJtcWhOpzSDRHupwHqiKLmSpgnE+CnVmA/UQA+NbIMFgHhNEiklMsAhZW0xk+JoVtAQdRSmxrj1 IfBaIgTJvkAPpnygxGaoDUq9N+fI23cngPcFASOGgCIhnwkJHiig05F7z5maGbKak9A3yZtuqWU Ztgf6UBTKkIk0maOYJdpcfcs1SV8SLZkI87Fr4iK+JDHo= X-Received: by 2002:a05:6a20:430a:b0:39f:2dd0:65d5 with SMTP id adf61e73a8af0-39f2f07e2fcmr6795719637.39.1775305294226; Sat, 04 Apr 2026 05:21:34 -0700 (PDT) Received: from n232-176-004.byted.org ([36.110.163.98]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-82cfebe5b23sm8327063b3a.59.2026.04.04.05.21.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Apr 2026 05:21:33 -0700 (PDT) From: Muchun Song To: Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: linux-mm@kvack.org, akpm@linux-foundation.org, Muchun Song , Muchun Song , Alexandre Ghiti , "Mike Rapoport (Microsoft)" , Kevin Brodsky , Austin Kim , "Vishal Moola (Oracle)" , Junhui Liu , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/5] riscv/mm: drop vmemmap_pmd helpers and use generic code Date: Sat, 4 Apr 2026 20:20:56 +0800 Message-Id: <20260404122105.3989557-4-songmuchun@bytedance.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20260404122105.3989557-1-songmuchun@bytedance.com> References: <20260404122105.3989557-1-songmuchun@bytedance.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The generic implementations now suffice; remove the riscv copies. Signed-off-by: Muchun Song --- arch/riscv/mm/init.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c index 5142ca80be6f..f7e7d7c2e97f 100644 --- a/arch/riscv/mm/init.c +++ b/arch/riscv/mm/init.c @@ -1429,19 +1429,6 @@ void __init misc_mem_init(void) } #ifdef CONFIG_SPARSEMEM_VMEMMAP -void __meminit vmemmap_set_pmd(pmd_t *pmd, void *p, int node, - unsigned long addr, unsigned long next) -{ - pmd_set_huge(pmd, virt_to_phys(p), PAGE_KERNEL); -} - -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 1; -} - int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node, struct vmem_altmap *altmap) { -- 2.20.1