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 4DD6F2C15A9 for ; Thu, 27 Nov 2025 10:29:52 +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=1764239393; cv=none; b=uZLw+AP8eP7SnwSHHfoMEtuuOwx0PR/Tq7tyjUIvX9yC+nT3r2965BM1p61kcBHCDRtfCYh7BUiXmhnxJTDTnWAiFIDrfbojAQ+k/IRUSRM0Nw0QCXcyKC3xFWhBIHhuuiVa9rOOhZCJNPFXwp/xAu4oWl4nZjsFGOn93stTZ5w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764239393; c=relaxed/simple; bh=6026FUcOZ7792wogGQD52EVUcUY2trkThOXOtUo+GfQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WPElySh8T8WbiLrea2x3XizjdUGjcQ4w8OpYQPu1IER/CQbEOiohTCKiGEfHoxfS1GXExB3/kbv/NOkhYsg9aD0jVaAgdlz4revKxKkQA+B1mVr84bQIu/8Ar2oWhxqso7nfp/3OuhxjCN09yeNJE00iZTDHe0jAB5yDwIx7pXo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OnWUQ2+V; 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="OnWUQ2+V" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 760C6C4CEF8; Thu, 27 Nov 2025 10:29:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1764239392; bh=6026FUcOZ7792wogGQD52EVUcUY2trkThOXOtUo+GfQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OnWUQ2+V127RmQUz5qQzGB0tW/qhEyMXNhJDFGclXUDD3NujYD4hb5z2GL/sukTDh a39tG+gjDEc1E8tOYGeiOM+lmQpn8PkPDZjIrN+Wm4gdla3sJrM64w0OQdNX5rZzlL KSl/xPm9+4wC6PTrMCHte1VlGqCQzHRRFSuoDI7F14PMZc0Sy0Lrsl1figTyKIx6lA MiL55H2r+9ZxkmZDzAqLuOaGBcJEMUX891x12xwUbB5VJhgtowZ1RJ4lqXY5tITFsm lAwQtudT0D2wOA/mp0HsW+rhNsvk4bx4KRyWaJ0JhddoDePktlNH5N/PbrxaIO94Pr febYBzhphPZnw== Date: Thu, 27 Nov 2025 12:29:45 +0200 From: Mike Rapoport To: "David Hildenbrand (Red Hat)" Cc: Jinhui Guo , akpm@linux-foundation.org, lorenzo.stoakes@oracle.com, Liam.Howlett@oracle.com, vbabka@suse.cz, surenb@google.com, mhocko@suse.com, fvdl@google.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/sparse: Fix sparse_vmemmap_init_nid_early definition without CONFIG_SPARSEMEM Message-ID: References: <20251127092512.278-1-guojinhui.liam@bytedance.com> <3cdc6bd6-f0c4-410f-b2a2-8cc2b5d1c522@kernel.org> 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: <3cdc6bd6-f0c4-410f-b2a2-8cc2b5d1c522@kernel.org> On Thu, Nov 27, 2025 at 10:46:54AM +0100, David Hildenbrand (Red Hat) wrote: > On 11/27/25 10:25, Jinhui Guo wrote: > > When CONFIG_SPARSEMEM is disabled, the macro > > sparse_vmemmap_init_nid_early(_nid, _use) passes > > two arguments, while the actual function accepts > > only nid. Drop the extra argument _use. > > > > Fixes: d65917c42373 ("mm/sparse: allow for alternate vmemmap section init at boot") > > Signed-off-by: Jinhui Guo > > --- > > include/linux/mmzone.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h > > index 7fb7331c5725..f6dd181a4821 100644 > > --- a/include/linux/mmzone.h > > +++ b/include/linux/mmzone.h > > @@ -2293,7 +2293,7 @@ void sparse_init(void); > > #else > > #define sparse_init() do {} while (0) > > #define sparse_index_init(_sec, _nid) do {} while (0) > > -#define sparse_vmemmap_init_nid_early(_nid, _use) do {} while (0) > > +#define sparse_vmemmap_init_nid_early(_nid) do {} while (0) > > #define sparse_vmemmap_init_nid_late(_nid) do {} while (0) > > #define pfn_in_present_section pfn_valid > > #define subsection_map_init(_pfn, _nr_pages) do {} while (0) > > That commit is from early 2025. > > So what are the symptoms we are fixing? I would have assumed a compile-time > problem, but no built bot caught that? Some of these are used only in sparse.c and sparse-vmmemap.c so with CONFIG_SPARSE=n they are completely unused. We probably should move them to mm/internal.h or even mm/sparse.h > -- > Cheers > David -- Sincerely yours, Mike.