[PATCH] drm/amdkfd: wrap dynamic debug call with CONFIG_DYNAMIC_DEBUG_CORE
Alex Sierra
alex.sierra at amd.com
Fri Aug 4 16:05:45 UTC 2023
This causes error compilation if CONFIG_DYNAMIC_DEBUG_CORE is not
defined.
Signed-off-by: Alex Sierra <alex.sierra at amd.com>
---
drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
index a69994ff1c2f..cde4cc6afa83 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
@@ -824,6 +824,7 @@ svm_range_is_same_attrs(struct kfd_process *p, struct svm_range *prange,
*
* Context: The caller must hold svms->lock
*/
+#if defined(CONFIG_DYNAMIC_DEBUG_CORE)
static void svm_range_debug_dump(struct svm_range_list *svms)
{
struct interval_tree_node *node;
@@ -851,6 +852,7 @@ static void svm_range_debug_dump(struct svm_range_list *svms)
node = interval_tree_iter_next(node, 0, ~0ULL);
}
}
+#endif
static void *
svm_range_copy_array(void *psrc, size_t size, uint64_t num_elements,
@@ -3594,7 +3596,9 @@ svm_range_set_attr(struct kfd_process *p, struct mm_struct *mm,
break;
}
+#if defined(CONFIG_DYNAMIC_DEBUG_CORE)
dynamic_svm_range_dump(svms);
+#endif
mutex_unlock(&svms->lock);
mmap_read_unlock(mm);
--
2.32.0
More information about the amd-gfx
mailing list