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 78EE730E844 for ; Mon, 17 Nov 2025 17:45:17 +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=1763401517; cv=none; b=EWBrzYLIfHShL6A6dgflB+RUmqElMXZeEUw/iyQLwYF0XVXZrA3IX9NLOcTVuo0+o/eTbZbF+Okdw0HWvqXwrm/hjAngTzJrK5pj6I6gXIymdlThtRkEX6E30xRCxjDzm7srngJQovu0bHkRp55VWSbaIP32Bfr6uToyVAGOadU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763401517; c=relaxed/simple; bh=Wer16b+rB3LiI3HuFjf+ijnokfMhiJQbIGr33VdxFh4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=A0qowHBC/9zBP2Kv9DTHkc4Aza9CZ9XlM/6YBZ5dqTElnUOXGFaJqqV/TitlGh7XxiX3R5E5npJ0FxSuJjX3N39rbKr3vgXWw0NBCta11LZ0gN2YHdx4Gng04h69KrvL1ypqGlmUDH5WgbhpGLJAmuwMHz946W4Gt/MYykyyxIo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FhoO3Xzk; 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="FhoO3Xzk" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 45A7AC4AF11; Mon, 17 Nov 2025 17:45:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763401516; bh=Wer16b+rB3LiI3HuFjf+ijnokfMhiJQbIGr33VdxFh4=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=FhoO3Xzk+6TFF2+9lQvnd9thOGHPmFq+yW7QFxuM5oJ0rYfpvHmLTjxk7216nTp6s NPXhLHo4++b90aHHXVknKIZc7YuPqrB9BQaFWNOXGdmCzUMpUdF/W5sM+FjT+UAmbX rLSLZhmUhLLhsO4y1eptazqJDNa6duGnehI3XL2CFbSHATAOTNKuQz8X2Ig+DqXmZZ yzkumyAk4vMoV0mEFfPd2n9NvDv4kSY5WKwT7feGYeMiX5SsdgJ6pfgQHTtGCL2DfG rhe9nrSNMboTGxMEXR9SD3EmuUAD3iyUb3RG28NJejM204eTI9ne90JT23hSLWo3EV YyH2+xOjexiaQ== Message-ID: Date: Mon, 17 Nov 2025 18:45:11 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC 07/10] treewide: rename has_transparent_hugepage() to arch_has_pmd_leaves() To: Luiz Capitulino , linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: ryan.roberts@arm.com, akpm@linux-foundation.org, lorenzo.stoakes@oracle.com References: <9b56da53df2f0da40be68de9a7208d527b144afa.1762464515.git.luizcap@redhat.com> From: "David Hildenbrand (Red Hat)" Content-Language: en-US In-Reply-To: <9b56da53df2f0da40be68de9a7208d527b144afa.1762464515.git.luizcap@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 06.11.25 22:28, Luiz Capitulino wrote: > Now that the majority of has_transparent_hugepage() callers have been > converted to pgtable_has_pmd_leaves(), rename has_transparent_hugepage() > to arch_has_pmd_leaves() since that's what the helper checks for. > > arch_has_pmd_leaves() is supposed to be called only by > init_arch_has_pmd_leaves(), except for two exeptions: > > 1. shmem: shmem code runs very early during boot so it can't use > pgtable_has_pmd_leaves() Can't we just initialize pgtable_has_pmd_leaves() earlier then? > 2. hugepage_init(): just a temporary exception, this function will be > converted in a future commit > > Signed-off-by: Luiz Capitulino > --- [...] > diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h > index e4c5f70b0a01..02a2772ec548 100644 > --- a/include/linux/pgtable.h > +++ b/include/linux/pgtable.h > @@ -2026,8 +2026,8 @@ static inline bool pgtable_has_pmd_leaves(void) > #endif > #endif > > -#ifndef has_transparent_hugepage > -#define has_transparent_hugepage() IS_BUILTIN(CONFIG_TRANSPARENT_HUGEPAGE) > +#ifndef arch_has_pmd_leaves > +#define arch_has_pmd_leaves() IS_BUILTIN(CONFIG_TRANSPARENT_HUGEPAGE) > #endif Ah, so it stays for now only set with CONFIG_TRANSPARENT_HUGEPAGE. I guess that's something to sort out later :) -- Cheers David