[Intel-gfx] [PATCH -next] i915/gem/dmabuf: add <asm/smp.h> to fix build error

Randy Dunlap rdunlap at infradead.org
Wed Oct 27 20:53:02 UTC 2021


When CONFIG_SMP is not set, wbinvd_on_all_cpus() is not declared,
due to missing <asm/smp.h>.

Fixes this build error:

../drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c: In function 'i915_gem_object_get_pages_dmabuf':
../drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c:251:3: error: implicit declaration of function 'wbinvd_on_all_cpus'; did you mean 'wrmsr_on_cpus'? [-Werror=implicit-function-declaration]
   wbinvd_on_all_cpus();

Fixes: a035154da45d ("drm/i915/dmabuf: add paranoid flush-on-acquire")
Signed-off-by: Randy Dunlap <rdunlap at infradead.org>
To: Jani Nikula <jani.nikula at linux.intel.com>
Cc: Thomas Hellström <thomas.hellstrom at linux.intel.com>
Cc: Matthew Auld <matthew.auld at intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
Cc: intel-gfx at lists.freedesktop.org
Cc: dri-devel at lists.freedesktop.org
---
 drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c |    1 +
 1 file changed, 1 insertion(+)

--- linux-next-20211027.orig/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
+++ linux-next-20211027/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
@@ -8,6 +8,7 @@
 #include <linux/highmem.h>
 #include <linux/dma-resv.h>
 #include <linux/module.h>
+#include <asm/smp.h>
 
 #include "i915_drv.h"
 #include "i915_gem_object.h"


More information about the Intel-gfx mailing list