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

From: Randy Dunlap
Date: Wed Oct 27 2021 - 16:53:08 EST


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@xxxxxxxxxxxxx>
To: Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx>
Cc: Thomas Hellström <thomas.hellstrom@xxxxxxxxxxxxxxx>
Cc: Matthew Auld <matthew.auld@xxxxxxxxx>
Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
Cc: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>
Cc: intel-gfx@xxxxxxxxxxxxxxxxxxxxx
Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx
---
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"