2021-01-25 12:57:13

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH] drm/i915/gem: fix non-SMP build failure

From: Arnd Bergmann <[email protected]>

The x86-specific wbinvd_on_all_cpus() function is exported
through asm/smp.h, causing a build failure in the i915 driver
when SMP is disabled:

drivers/gpu/drm/i915/i915_gem.c:1182:2: error: implicit declaration of function 'wbinvd_on_all_cpus' [-Werror,-Wimplicit-function-declaration]

Include that header file explicitly.

Fixes: 30d2bfd09383 ("drm/i915/gem: Almagamate clflushes on freeze")
Signed-off-by: Arnd Bergmann <[email protected]>
---
drivers/gpu/drm/i915/i915_gem.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 9b04dff5eb32..2a1643514577 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -36,6 +36,7 @@
#include <linux/pci.h>
#include <linux/dma-buf.h>
#include <linux/mman.h>
+#include <asm/smp.h>

#include "display/intel_display.h"
#include "display/intel_frontbuffer.h"
--
2.29.2


2021-01-26 03:09:19

by Chris Wilson

[permalink] [raw]
Subject: Re: [PATCH] drm/i915/gem: fix non-SMP build failure

Quoting Arnd Bergmann (2021-01-25 12:25:34)
> From: Arnd Bergmann <[email protected]>
>
> The x86-specific wbinvd_on_all_cpus() function is exported
> through asm/smp.h, causing a build failure in the i915 driver
> when SMP is disabled:
>
> drivers/gpu/drm/i915/i915_gem.c:1182:2: error: implicit declaration of function 'wbinvd_on_all_cpus' [-Werror,-Wimplicit-function-declaration]

I thought the code was already in i915_gem_pm.c (which included smp.h);
it is now.
-Chris