Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Piórkowski, Piotr" <piotr.piorkowski@intel.com>,
	intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v6 4/4] drm/xe/ggtt: Add KUnit tests for usable and shareable pools
Date: Tue, 20 Oct 2026 10:15:44 +0000	[thread overview]
Message-ID: <sashiko-outbox-178818@kernel.org> (raw)
In-Reply-To: <20261020095532.473609-5-piotr.piorkowski@intel.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] drm/xe: unguarded ggtt_test_insert_node_shareable() breaks !CONFIG_PCI_IOV
--

commit 860da7a3db2d0c0c83dbaf117f1d5b696f429f4f
Author: Piotr Piórkowski <piotr.piorkowski@intel.com>

drm/xe/ggtt: Add KUnit tests for usable and shareable pools

This commit adds GGTT KUnit tests covering range initialization, allocation
direction, and pool conflicts for the usable and shareable GGTT pools in
native and PF modes.

> diff --git a/drivers/gpu/drm/xe/tests/xe_ggtt_kunit.c b/drivers/gpu/drm/xe/tests/xe_ggtt_kunit.c
> new file mode 100644
> index 0000000000000..03e4f212c62e5
> --- /dev/null
> +++ b/drivers/gpu/drm/xe/tests/xe_ggtt_kunit.c

[ ... ]

> +static struct xe_ggtt_node *ggtt_test_insert_node(struct kunit *test,
> +						  struct xe_ggtt *ggtt, u32 size)
> +{
> +	return ggtt_test_track_node(test, xe_ggtt_insert_node(ggtt, size, XE_PAGE_SIZE));
> +}
> +
> +static struct xe_ggtt_node *ggtt_test_insert_node_shareable(struct kunit *test,
> +							    struct xe_ggtt *ggtt, u32 size)
> +{
> +	return ggtt_test_track_node(test,
> +				    xe_ggtt_insert_node_shareable(ggtt, size, XE_PAGE_SIZE));
> +}

[Severity: Low]
Should ggtt_test_insert_node_shareable() be moved inside the
#if IS_ENABLED(CONFIG_PCI_IOV) block below?

In drivers/gpu/drm/xe/xe_ggtt.c and drivers/gpu/drm/xe/xe_ggtt.h,
xe_ggtt_insert_node_shareable() is only declared and defined under
#ifdef CONFIG_PCI_IOV, and all callers of ggtt_test_insert_node_shareable()
are inside the #if IS_ENABLED(CONFIG_PCI_IOV) block.

When building with CONFIG_DRM_XE_KUNIT_TEST=y and CONFIG_PCI_IOV=n, does this
fail to compile with an implicit function declaration for
xe_ggtt_insert_node_shareable() and an unused-function warning for
ggtt_test_insert_node_shareable()?

[ ... ]

> +#if IS_ENABLED(CONFIG_PCI_IOV)
> +static void init_shared_pf(struct kunit *test)
> +{

[ ... ]

> +}
> +#endif

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261020095532.473609-1-piotr.piorkowski@intel.com?part=4

  reply	other threads:[~2026-10-20 10:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-20  9:55 [PATCH v6 0/4] Separate GGTT pools for submissions and VFs provisioning Piórkowski, Piotr
2026-10-20  9:55 ` [PATCH v6 1/4] drm/xe/ggtt: Introduce full GGTT range size Piórkowski, Piotr
2026-10-20  9:55 ` [PATCH v6 2/4] drm/xe/ggtt: Split GGTT into usable and shareable pools Piórkowski, Piotr
2026-10-20  9:55 ` [PATCH v6 3/4] drm/xe/ggtt: Initialize GGTT pools by SR-IOV mode Piórkowski, Piotr
2026-10-20  9:55 ` [PATCH v6 4/4] drm/xe/ggtt: Add KUnit tests for usable and shareable pools Piórkowski, Piotr
2026-10-20 10:15   ` sashiko-bot [this message]
2026-10-20 11:23 ` ✗ CI.checkpatch: warning for Separate GGTT pools for submissions and VFs provisioning (rev6) Patchwork
2026-10-20 11:25 ` ✓ CI.KUnit: success " Patchwork
2026-10-20 12:04 ` ✓ Xe.CI.BAT: " Patchwork
2026-10-20 14:58 ` ✓ Xe.CI.FULL: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-178818@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=piotr.piorkowski@intel.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox