[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <db6f2106e8925fd3e037ae95c2eebe9b3410d7d7.1765833318.git.luizcap@redhat.com>
Date: Mon, 15 Dec 2025 16:16:46 -0500
From: Luiz Capitulino <luizcap@...hat.com>
To: linux-kernel@...r.kernel.org,
linux-mm@...ck.org,
david@...nel.org
Cc: ryan.roberts@....com,
akpm@...ux-foundation.org,
lorenzo.stoakes@...cle.com
Subject: [PATCH 04/11] drivers: i915 selftest: use pgtable_has_pmd_leaves()
igt_can_allocate_thp() uses has_transparent_hugepage() to check if
PMD-sized pages are supported, use pgtable_has_pmd_leaves() instead.
Since igt_can_allocate_thp() wants to use PMD-sized pages with THP,
also check if THP is built-in with IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE).
Signed-off-by: Luiz Capitulino <luizcap@...hat.com>
---
drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
index bd08605a1611..dcd1f1141513 100644
--- a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
+++ b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
@@ -1316,7 +1316,9 @@ typedef struct drm_i915_gem_object *
static inline bool igt_can_allocate_thp(struct drm_i915_private *i915)
{
- return i915->mm.gemfs && has_transparent_hugepage();
+ return i915->mm.gemfs &&
+ IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE) &&
+ pgtable_has_pmd_leaves();
}
static struct drm_i915_gem_object *
--
2.52.0
Powered by blists - more mailing lists