[PATCH 1/5] drm/xe: Export xe_step_name for kunit tests
Michal Wajdeczko
michal.wajdeczko at intel.com
Fri Jun 13 15:52:52 UTC 2025
On 13.06.2025 02:14, Matt Roper wrote:
> xe_step_name() is used by xe_assert(), so adding assertions to functions
> like xe_device_get_gt() will result in
>
> ERROR: modpost: "xe_step_name" [drivers/gpu/drm/xe/tests/xe_test.ko] undefined!
>
> while building the kunit tests. Export xe_step_name to avoid these
> build failures when adding assertions.
>
> Signed-off-by: Matt Roper <matthew.d.roper at intel.com>
this looks exactly as my patch from Feb [1] so it must be good ;)
Reviewed-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
[1] https://patchwork.freedesktop.org/patch/638883/?series=145269&rev=1
> ---
> drivers/gpu/drm/xe/xe_step.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_step.c b/drivers/gpu/drm/xe/xe_step.c
> index c77b5c317fa0..10e88f2c9615 100644
> --- a/drivers/gpu/drm/xe/xe_step.c
> +++ b/drivers/gpu/drm/xe/xe_step.c
> @@ -5,6 +5,7 @@
>
> #include "xe_step.h"
>
> +#include <kunit/visibility.h>
> #include <linux/bitfield.h>
>
> #include "xe_device.h"
> @@ -255,3 +256,4 @@ const char *xe_step_name(enum xe_step step)
> return "**";
> }
> }
> +EXPORT_SYMBOL_IF_KUNIT(xe_step_name);
More information about the Intel-xe
mailing list