From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 9CC7F3F5BF8 for ; Tue, 7 Jul 2026 11:11:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783422674; cv=none; b=r19xQEqMEwuT75M353dBKyn8ZzgvMzqBOvKc6LrnMookgbX7FsFATB13BxqBltFZlz/XpgBbocRi3gn9NQRlAGihYKlYJq8e03p0Oi1waRDVXaZNC16Pft59VMcxuIMc8YXUk95UsdgQ1DPWkAd0BB5srfpPoZMihk5Sm9zVjKI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783422674; c=relaxed/simple; bh=2hbRWybrWbQeXRAXNmeu0EJK39GKccAmS/slMUt0p4s=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nYdfcwXO6Gy9BK9r1MSOT2TES2X7F1AGRSxGpGduvWf+Y4icwiWcCTSjLDkpdzMYVkYc1wH082qMaensqgDU766JuyUBYrHJp5YURtfKi2ovgyp31U0ECV1OY+ePx/HzA/SIshhgXWjIzXFHWPgSI1BOXELIt/JAPsad6JQjgyI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KCONi7YL; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KCONi7YL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2678F1F000E9; Tue, 7 Jul 2026 11:11:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1783422671; bh=iTtyFBKpC/9Rr+IQFQF1FMdSFl6tkNhkuc41pgWUwKU=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=KCONi7YLJsHj83vwhEYusXcFZ1TyfVSY7LLadiJL59mR77UUle7xHU4OxBOPBYKMS pgX65zNxXjhU3NIXPyRVMZOel1/3ooHBaL4eNPsZDAz1r8XfcTcohuvR/Now9vC7EY HxS1gOol+eYn3y5HF9jZ5C20QgqBkGj2JTJwt87fZcthWOlWp5cnMnj9fZOd7ounwy 0sbCcjho8L+ai42lDB5Mhdp8hSjjnD3onbqbCJ5chwncEVh19RyZxk4iUV2gHYSHgd iGJ3zKFfYkC0BEtHH+eaaepZH5C+tDY50+uoRgZnrwx82/slD617CeeIQoFqY00Dr2 WTuqa7U6gESpg== Date: Tue, 7 Jul 2026 12:11:01 +0100 From: Lorenzo Stoakes To: Kaitao Cheng Cc: Andrew Morton , David Hildenbrand , "Liam R . Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Muchun Song , Kaitao Cheng Subject: Re: [PATCH] mm/kconfig: Drop redundant memory hotplug dependencies Message-ID: References: <20260707090331.52971-1-kaitao.cheng@linux.dev> 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: <20260707090331.52971-1-kaitao.cheng@linux.dev> On Tue, Jul 07, 2026 at 05:03:31PM +0800, Kaitao Cheng wrote: > From: Kaitao Cheng > > MHP_MEMMAP_ON_MEMORY is defined inside the MEMORY_HOTPLUG block, and > MEMORY_HOTPLUG already depends on SPARSEMEM_VMEMMAP. Keep the explicit > MEMORY_HOTPLUG dependency for local readability, but drop the redundant > SPARSEMEM_VMEMMAP dependency. > > ZONE_DEVICE depends on MEMORY_HOTREMOVE, which depends on MEMORY_HOTPLUG. > MEMORY_HOTPLUG in turn depends on SPARSEMEM_VMEMMAP. Drop the direct > MEMORY_HOTPLUG and SPARSEMEM_VMEMMAP dependencies from ZONE_DEVICE. > > This does not change the set of valid configurations. > > Signed-off-by: Kaitao Cheng LGTM, so: Reviewed-by: Lorenzo Stoakes > --- > mm/Kconfig | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/mm/Kconfig b/mm/Kconfig > index 04fe5171bb8c..ff29f770d10a 100644 > --- a/mm/Kconfig > +++ b/mm/Kconfig > @@ -596,7 +596,7 @@ config MEMORY_HOTREMOVE > > config MHP_MEMMAP_ON_MEMORY > def_bool y > - depends on MEMORY_HOTPLUG && SPARSEMEM_VMEMMAP > + depends on MEMORY_HOTPLUG > depends on ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE > > endif # MEMORY_HOTPLUG > @@ -1235,9 +1235,7 @@ config ZONE_DMA32 > > config ZONE_DEVICE > bool "Device memory (pmem, HMM, etc...) hotplug support" > - depends on MEMORY_HOTPLUG > depends on MEMORY_HOTREMOVE > - depends on SPARSEMEM_VMEMMAP > select XARRAY_MULTI > > help > -- > 2.50.1 (Apple Git-155) > Cheers, Lorenzo