From nobody Fri Dec 19 20:14:03 2025 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 45D1132D0EE for ; Mon, 15 Dec 2025 21:17:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765833439; cv=none; b=uPFG8jMqiBvSVtwcdocqaj9dM9R8/zpmZ3apnFhhslGFLUrb3i/880qAfBZYQ8HEN2Odn4CJa7MS3uTq/9AACuU8gmsqNp8p4U/7OZ+SBMXOzj6SnhPA6z3Ey9Zwgy3IscuZTcgOp8AiRGIS3jdCv5eMui6WnPSybeL3TR8BKm4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765833439; c=relaxed/simple; bh=eHgAKW9ynVrb0zCeBYUX1HbEJt5DAaMuvsfNTSBmR8A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qFVqJkvPJdjzmG0oBGBQ0a8+w52Oo0wccqA2zBNicg0REaqWmItZHDnZvYUYCWqvhAywcBL4eptuKRWFH2TsbtpkZSxkz/ASnWHwFxaLZJcdFFa9LRBGUF+DJL1QTNc4nOlvpTv+sizyD12yk8aqhttVuQAaP9qeh7BhSfCeOP4= 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=Ve5qpHyX; arc=none smtp.client-ip=170.10.129.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="Ve5qpHyX" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1765833437; 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=ERLBqkSCsiAT2a8lrpPaYWFSekwg89Uo0SE97BBpI8w=; b=Ve5qpHyXuTX2Htqb6Zl6hXvTXQHcaUDyWRwLalZMMFJB9kI4lghFBqf56Z15oXmiVTcMHs qPZ/esn3PHCqGOWOeUowSzmjXm12N+CL63bPeCcYU0U8F81GE8s5BuFnKrScoUVgseYmsw 5HQy3yWs/hf5ZcWbck2UsyNj+rxfJUE= Received: from mx-prod-mc-01.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-253-LjBqv_h-PmqjiskxPdjVxw-1; Mon, 15 Dec 2025 16:17:12 -0500 X-MC-Unique: LjBqv_h-PmqjiskxPdjVxw-1 X-Mimecast-MFC-AGG-ID: LjBqv_h-PmqjiskxPdjVxw_1765833431 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 73A7B195DE49; Mon, 15 Dec 2025 21:17:11 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.22.80.180]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 54A5F1955F21; Mon, 15 Dec 2025 21:17:10 +0000 (UTC) From: Luiz Capitulino To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, david@kernel.org Cc: ryan.roberts@arm.com, akpm@linux-foundation.org, lorenzo.stoakes@oracle.com Subject: [PATCH 04/11] drivers: i915 selftest: use pgtable_has_pmd_leaves() Date: Mon, 15 Dec 2025 16:16:46 -0500 Message-ID: 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.0 on 10.30.177.17 Content-Type: text/plain; charset="utf-8" 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 --- 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.52.0