From nobody Wed Feb 11 05:14:54 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 A61FB3126A0 for ; Mon, 9 Feb 2026 22:14:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770675295; cv=none; b=ta1gk5JAPN/6A0/JYWMM7GVQvVpMARjcMMoaoUcgCaE/cp5PvsWopJOcunX6eKKBMDkps34/WXc2d9S2CEZuIG7lYN6vav9FZYv2gWhj1jGdfXe6w1KvKhllLn8ppo871Nh/CKpF5kL70NjD7H+OipxygaAuNgM+UwhxUcUaPnQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770675295; c=relaxed/simple; bh=MekWNW6lGnfaa9quRhK4hdUbD1ntDcrXLM4mm4Mv1DI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lVesrvoxuUz2szatn/xb0Y+ka8Q+FaNk+NGkPEncs13p1FEV68Qv35ylbpPH9jAbIKQ1ohx9PFnQNs6+UAYs7y0oXrwYUbmkh+jkZhLQKWb84/WA43j5sY0MRLwY9loti8wxlTHOfw2HaHkjSCMnf5pA7nn2JDxe1lwbtQlqqh0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=J5gFIn8u; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="J5gFIn8u" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1770675293; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OiFiUMpX2KB1Jv/lqdujtPm172YWQGONs7yMm/FtBvY=; b=J5gFIn8uh8dZobxmTp3RZexhYiaUULZg6zrU1AAmLlvwsKO9nZriOU7aloSovTRJwokMDg iuA3FOG3tMH5brwsGBuS1sZpJdWTZ9asbphQheVfZ/B+XofG2MlCimYp61YyFZLsPB34om 9qV1RPdWmENW3IIzGcgDwNiKGKr3nOg= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-100-N0_AAJneNLm9RMcrR_haJw-1; Mon, 09 Feb 2026 17:14:52 -0500 X-MC-Unique: N0_AAJneNLm9RMcrR_haJw-1 X-Mimecast-MFC-AGG-ID: N0_AAJneNLm9RMcrR_haJw_1770675291 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 49F0F1956089; Mon, 9 Feb 2026 22:14:51 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.22.65.66]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1296F18003F6; Mon, 9 Feb 2026 22:14:49 +0000 (UTC) From: Luiz Capitulino To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, david@kernel.org, baolin.wang@linux.alibaba.com Cc: ryan.roberts@arm.com, akpm@linux-foundation.org, lorenzo.stoakes@oracle.com Subject: [PATCH v2 04/11] drivers: i915 selftest: use pgtable_has_pmd_leaves() Date: Mon, 9 Feb 2026 17:14:26 -0500 Message-ID: <5f829c4198fe72ac71e3e62426e12d475501ae51.1770675272.git.luizcap@redhat.com> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Content-Type: text/plain; charset="utf-8" igt_can_allocate_thp() uses has_transparent_hugepage() to check if THP is supported with PMD-sized pages. However, has_transparent_hugepage() is being replaced by an API that has clearer semantics. Thus, replace has_transparent_hugepage() with pgtable_has_pmd_leaves() and a check for IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE), this makes the intent of the check very clear. Signed-off-by: Luiz Capitulino --- 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 * =20 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(); } =20 static struct drm_i915_gem_object * --=20 2.53.0