Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe: Fix compilation without CONFIG_KUNIT
@ 2024-01-05 17:19 Michal Wajdeczko
  2024-01-05 17:31 ` Souza, Jose
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Michal Wajdeczko @ 2024-01-05 17:19 UTC (permalink / raw)
  To: intel-xe

It looks that declaration of kunit_get_current_test() was
available in xe_guc_relay.c only with CONFIG_KUNIT enabled.
If CONFIG_KUNIT is disabled we fail with:

In file included from ../include/linux/build_bug.h:5,
                 from ../include/linux/bitfield.h:10,
                 from ../drivers/gpu/drm/xe/xe_guc_relay.c:6:
../drivers/gpu/drm/xe/xe_guc_relay.c: In function ‘xe_guc_relay_process_guc2vf’:
../drivers/gpu/drm/xe/xe_guc_relay.c:863:52: error: implicit declaration of function ‘kunit_get_current_test’ [-Werror=implicit-function-declaration]
  863 |  if (unlikely(!IS_SRIOV_VF(relay_to_xe(relay)) && !kunit_get_current_test()))
      |                                                    ^~~~~~~~~~~~~~~~~~~~~~
../include/linux/compiler.h:77:42: note: in definition of macro ‘unlikely’
   77 | # define unlikely(x) __builtin_expect(!!(x), 0)
      |                                          ^

Reported-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Fixes: 9a2c2ecb1b77 ("drm/xe/guc: Introduce Relay Communication for SR-IOV")
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
---
 drivers/gpu/drm/xe/xe_guc_relay.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/xe/xe_guc_relay.c b/drivers/gpu/drm/xe/xe_guc_relay.c
index b772088979bd..c0a2d8d5d3b3 100644
--- a/drivers/gpu/drm/xe/xe_guc_relay.c
+++ b/drivers/gpu/drm/xe/xe_guc_relay.c
@@ -9,6 +9,7 @@
 #include <drm/drm_managed.h>
 
 #include <kunit/static_stub.h>
+#include <kunit/test-bug.h>
 
 #include "abi/guc_actions_sriov_abi.h"
 #include "abi/guc_relay_actions_abi.h"
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/xe: Fix compilation without CONFIG_KUNIT
  2024-01-05 17:19 [PATCH] drm/xe: Fix compilation without CONFIG_KUNIT Michal Wajdeczko
@ 2024-01-05 17:31 ` Souza, Jose
  2024-01-05 20:25 ` Belgaumkar, Vinay
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Souza, Jose @ 2024-01-05 17:31 UTC (permalink / raw)
  To: intel-xe@lists.freedesktop.org, Wajdeczko, Michal

On Fri, 2024-01-05 at 18:19 +0100, Michal Wajdeczko wrote:
> It looks that declaration of kunit_get_current_test() was
> available in xe_guc_relay.c only with CONFIG_KUNIT enabled.
> If CONFIG_KUNIT is disabled we fail with:
> 
> In file included from ../include/linux/build_bug.h:5,
>                  from ../include/linux/bitfield.h:10,
>                  from ../drivers/gpu/drm/xe/xe_guc_relay.c:6:
> ../drivers/gpu/drm/xe/xe_guc_relay.c: In function ‘xe_guc_relay_process_guc2vf’:
> ../drivers/gpu/drm/xe/xe_guc_relay.c:863:52: error: implicit declaration of function ‘kunit_get_current_test’ [-Werror=implicit-function-declaration]
>   863 |  if (unlikely(!IS_SRIOV_VF(relay_to_xe(relay)) && !kunit_get_current_test()))
>       |                                                    ^~~~~~~~~~~~~~~~~~~~~~
> ../include/linux/compiler.h:77:42: note: in definition of macro ‘unlikely’
>    77 | # define unlikely(x) __builtin_expect(!!(x), 0)
>       |                                          ^
> 

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>

> Reported-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> Fixes: 9a2c2ecb1b77 ("drm/xe/guc: Introduce Relay Communication for SR-IOV")
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> ---
>  drivers/gpu/drm/xe/xe_guc_relay.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/xe/xe_guc_relay.c b/drivers/gpu/drm/xe/xe_guc_relay.c
> index b772088979bd..c0a2d8d5d3b3 100644
> --- a/drivers/gpu/drm/xe/xe_guc_relay.c
> +++ b/drivers/gpu/drm/xe/xe_guc_relay.c
> @@ -9,6 +9,7 @@
>  #include <drm/drm_managed.h>
>  
>  #include <kunit/static_stub.h>
> +#include <kunit/test-bug.h>
>  
>  #include "abi/guc_actions_sriov_abi.h"
>  #include "abi/guc_relay_actions_abi.h"


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/xe: Fix compilation without CONFIG_KUNIT
  2024-01-05 17:19 [PATCH] drm/xe: Fix compilation without CONFIG_KUNIT Michal Wajdeczko
  2024-01-05 17:31 ` Souza, Jose
@ 2024-01-05 20:25 ` Belgaumkar, Vinay
  2024-01-06  0:54 ` ✗ CI.Patch_applied: failure for " Patchwork
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Belgaumkar, Vinay @ 2024-01-05 20:25 UTC (permalink / raw)
  To: Michal Wajdeczko, intel-xe


On 1/5/2024 9:19 AM, Michal Wajdeczko wrote:
> It looks that declaration of kunit_get_current_test() was
> available in xe_guc_relay.c only with CONFIG_KUNIT enabled.
> If CONFIG_KUNIT is disabled we fail with:
>
> In file included from ../include/linux/build_bug.h:5,
>                   from ../include/linux/bitfield.h:10,
>                   from ../drivers/gpu/drm/xe/xe_guc_relay.c:6:
> ../drivers/gpu/drm/xe/xe_guc_relay.c: In function ‘xe_guc_relay_process_guc2vf’:
> ../drivers/gpu/drm/xe/xe_guc_relay.c:863:52: error: implicit declaration of function ‘kunit_get_current_test’ [-Werror=implicit-function-declaration]
>    863 |  if (unlikely(!IS_SRIOV_VF(relay_to_xe(relay)) && !kunit_get_current_test()))
>        |                                                    ^~~~~~~~~~~~~~~~~~~~~~
> ../include/linux/compiler.h:77:42: note: in definition of macro ‘unlikely’
>     77 | # define unlikely(x) __builtin_expect(!!(x), 0)
>        |                                          ^
>
> Reported-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> Fixes: 9a2c2ecb1b77 ("drm/xe/guc: Introduce Relay Communication for SR-IOV")
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> ---
>   drivers/gpu/drm/xe/xe_guc_relay.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_guc_relay.c b/drivers/gpu/drm/xe/xe_guc_relay.c
> index b772088979bd..c0a2d8d5d3b3 100644
> --- a/drivers/gpu/drm/xe/xe_guc_relay.c
> +++ b/drivers/gpu/drm/xe/xe_guc_relay.c
> @@ -9,6 +9,7 @@
>   #include <drm/drm_managed.h>
>   
>   #include <kunit/static_stub.h>
> +#include <kunit/test-bug.h>

Compile works with this fix-

Tested-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>

>   
>   #include "abi/guc_actions_sriov_abi.h"
>   #include "abi/guc_relay_actions_abi.h"

^ permalink raw reply	[flat|nested] 6+ messages in thread

* ✗ CI.Patch_applied: failure for drm/xe: Fix compilation without CONFIG_KUNIT
  2024-01-05 17:19 [PATCH] drm/xe: Fix compilation without CONFIG_KUNIT Michal Wajdeczko
  2024-01-05 17:31 ` Souza, Jose
  2024-01-05 20:25 ` Belgaumkar, Vinay
@ 2024-01-06  0:54 ` Patchwork
  2024-01-08  8:30 ` Patchwork
  2024-01-09 15:10 ` [PATCH] " Michal Wajdeczko
  4 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2024-01-06  0:54 UTC (permalink / raw)
  To: Michal Wajdeczko; +Cc: intel-xe

== Series Details ==

Series: drm/xe: Fix compilation without CONFIG_KUNIT
URL   : https://patchwork.freedesktop.org/series/128273/
State : failure

== Summary ==

=== Applying kernel patches on branch 'drm-xe-next' with base: ===
Base commit: cca0607b6 drm/xe: Fix compilation without CONFIG_KUNIT
=== git am output follows ===
error: patch failed: drivers/gpu/drm/xe/xe_guc_relay.c:9
error: drivers/gpu/drm/xe/xe_guc_relay.c: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: drm/xe: Fix compilation without CONFIG_KUNIT
Patch failed at 0001 drm/xe: Fix compilation without CONFIG_KUNIT
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".



^ permalink raw reply	[flat|nested] 6+ messages in thread

* ✗ CI.Patch_applied: failure for drm/xe: Fix compilation without CONFIG_KUNIT
  2024-01-05 17:19 [PATCH] drm/xe: Fix compilation without CONFIG_KUNIT Michal Wajdeczko
                   ` (2 preceding siblings ...)
  2024-01-06  0:54 ` ✗ CI.Patch_applied: failure for " Patchwork
@ 2024-01-08  8:30 ` Patchwork
  2024-01-09 15:10 ` [PATCH] " Michal Wajdeczko
  4 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2024-01-08  8:30 UTC (permalink / raw)
  To: Michal Wajdeczko; +Cc: intel-xe

== Series Details ==

Series: drm/xe: Fix compilation without CONFIG_KUNIT
URL   : https://patchwork.freedesktop.org/series/128273/
State : failure

== Summary ==

=== Applying kernel patches on branch 'drm-xe-next' with base: ===
Base commit: cca0607b6 drm/xe: Fix compilation without CONFIG_KUNIT
=== git am output follows ===
error: patch failed: drivers/gpu/drm/xe/xe_guc_relay.c:9
error: drivers/gpu/drm/xe/xe_guc_relay.c: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: drm/xe: Fix compilation without CONFIG_KUNIT
Patch failed at 0001 drm/xe: Fix compilation without CONFIG_KUNIT
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/xe: Fix compilation without CONFIG_KUNIT
  2024-01-05 17:19 [PATCH] drm/xe: Fix compilation without CONFIG_KUNIT Michal Wajdeczko
                   ` (3 preceding siblings ...)
  2024-01-08  8:30 ` Patchwork
@ 2024-01-09 15:10 ` Michal Wajdeczko
  4 siblings, 0 replies; 6+ messages in thread
From: Michal Wajdeczko @ 2024-01-09 15:10 UTC (permalink / raw)
  To: intel-xe



On 05.01.2024 18:19, Michal Wajdeczko wrote:
> It looks that declaration of kunit_get_current_test() was
> available in xe_guc_relay.c only with CONFIG_KUNIT enabled.
> If CONFIG_KUNIT is disabled we fail with:
> 
> In file included from ../include/linux/build_bug.h:5,
>                  from ../include/linux/bitfield.h:10,
>                  from ../drivers/gpu/drm/xe/xe_guc_relay.c:6:
> ../drivers/gpu/drm/xe/xe_guc_relay.c: In function ‘xe_guc_relay_process_guc2vf’:
> ../drivers/gpu/drm/xe/xe_guc_relay.c:863:52: error: implicit declaration of function ‘kunit_get_current_test’ [-Werror=implicit-function-declaration]
>   863 |  if (unlikely(!IS_SRIOV_VF(relay_to_xe(relay)) && !kunit_get_current_test()))
>       |                                                    ^~~~~~~~~~~~~~~~~~~~~~
> ../include/linux/compiler.h:77:42: note: in definition of macro ‘unlikely’
>    77 | # define unlikely(x) __builtin_expect(!!(x), 0)
>       |                                          ^
> 
> Reported-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> Fixes: 9a2c2ecb1b77 ("drm/xe/guc: Introduce Relay Communication for SR-IOV")

kernel test robot says problem was introduces by other patch, so it
should rather be:

Fixes: 27b717bac93f ("drm/xe/kunit: Add GuC Relay kunit test")

and since it's already merged, also for the record:

Closes:
https://lore.kernel.org/oe-kbuild-all/202401070036.60pNn4uZ-lkp@intel.com/

> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> ---
>  drivers/gpu/drm/xe/xe_guc_relay.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/xe/xe_guc_relay.c b/drivers/gpu/drm/xe/xe_guc_relay.c
> index b772088979bd..c0a2d8d5d3b3 100644
> --- a/drivers/gpu/drm/xe/xe_guc_relay.c
> +++ b/drivers/gpu/drm/xe/xe_guc_relay.c
> @@ -9,6 +9,7 @@
>  #include <drm/drm_managed.h>
>  
>  #include <kunit/static_stub.h>
> +#include <kunit/test-bug.h>
>  
>  #include "abi/guc_actions_sriov_abi.h"
>  #include "abi/guc_relay_actions_abi.h"

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-01-09 15:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-05 17:19 [PATCH] drm/xe: Fix compilation without CONFIG_KUNIT Michal Wajdeczko
2024-01-05 17:31 ` Souza, Jose
2024-01-05 20:25 ` Belgaumkar, Vinay
2024-01-06  0:54 ` ✗ CI.Patch_applied: failure for " Patchwork
2024-01-08  8:30 ` Patchwork
2024-01-09 15:10 ` [PATCH] " Michal Wajdeczko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox