aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/5689-drm-amdkfd-fix-build-select-MMU_NOTIFIER.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/5689-drm-amdkfd-fix-build-select-MMU_NOTIFIER.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.14.71/5689-drm-amdkfd-fix-build-select-MMU_NOTIFIER.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/5689-drm-amdkfd-fix-build-select-MMU_NOTIFIER.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/5689-drm-amdkfd-fix-build-select-MMU_NOTIFIER.patch
new file mode 100644
index 00000000..20a13275
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/5689-drm-amdkfd-fix-build-select-MMU_NOTIFIER.patch
@@ -0,0 +1,41 @@
+From 642bf4e1b54e0b6cdc73ea0b33df3f2ce22ec847 Mon Sep 17 00:00:00 2001
+From: Randy Dunlap <rdunlap@infradead.org>
+Date: Fri, 13 Apr 2018 19:49:28 -0700
+Subject: [PATCH 5689/5725] drm/amdkfd: fix build, select MMU_NOTIFIER
+
+When CONFIG_MMU_NOTIFIER is not enabled, struct mmu_notifier has an
+incomplete type definition, which causes build errors.
+
+../drivers/gpu/drm/amd/amdkfd/kfd_priv.h:607:22: error: field 'mmu_notifier' has incomplete type
+../include/linux/kernel.h:979:32: error: dereferencing pointer to incomplete type
+../include/linux/kernel.h:980:18: error: dereferencing pointer to incomplete type
+../drivers/gpu/drm/amd/amdkfd/kfd_process.c:434:2: error: implicit declaration of function 'mmu_notifier_unregister_no_release' [-Werror=implicit-function-declaration]
+../drivers/gpu/drm/amd/amdkfd/kfd_process.c:435:2: error: implicit declaration of function 'mmu_notifier_call_srcu' [-Werror=implicit-function-declaration]
+../drivers/gpu/drm/amd/amdkfd/kfd_process.c:438:21: error: variable 'kfd_process_mmu_notifier_ops' has initializer but incomplete type
+../drivers/gpu/drm/amd/amdkfd/kfd_process.c:439:2: error: unknown field 'release' specified in initializer
+../drivers/gpu/drm/amd/amdkfd/kfd_process.c:439:2: warning: excess elements in struct initializer [enabled by default]
+../drivers/gpu/drm/amd/amdkfd/kfd_process.c:439:2: warning: (near initialization for 'kfd_process_mmu_notifier_ops') [enabled by default]
+../drivers/gpu/drm/amd/amdkfd/kfd_process.c:534:2: error: implicit declaration of function 'mmu_notifier_register' [-Werror=implicit-function-declaration]
+
+Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
+Tested-by: Anders Roxell <anders.roxell@linaro.org>
+Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
+Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
+---
+ drivers/gpu/drm/amd/amdkfd/Kconfig | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/gpu/drm/amd/amdkfd/Kconfig b/drivers/gpu/drm/amd/amdkfd/Kconfig
+index 50b8b56..bc8d8f7 100644
+--- a/drivers/gpu/drm/amd/amdkfd/Kconfig
++++ b/drivers/gpu/drm/amd/amdkfd/Kconfig
+@@ -7,5 +7,6 @@ config HSA_AMD
+ depends on (DRM_RADEON || DRM_AMDGPU) && (X86_64 || PPC64 || ARM64)
+ select DRM_AMDGPU_USERPTR
+ imply AMD_IOMMU_V2
++ select MMU_NOTIFIER
+ help
+ Enable this if you want to use HSA features on AMD GPU devices.
+--
+2.7.4
+