✗ CI.checkpatch: warning for drm/xe: Unmap userptr in MMU invalidation notifier (rev2)

Patchwork patchwork at emeril.freedesktop.org
Tue Apr 30 03:04:48 UTC 2024


== Series Details ==

Series: drm/xe: Unmap userptr in MMU invalidation notifier (rev2)
URL   : https://patchwork.freedesktop.org/series/132978/
State : warning

== Summary ==

+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt
Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master
0daf0be5bb95eb0a0e42275e00a0e42d8d8fd543
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit fd303e5703bc9adad503ffcc3f1e1ade7fb084b4
Author: Matthew Brost <matthew.brost at intel.com>
Date:   Mon Apr 29 20:00:20 2024 -0700

    drm/xe: Unmap userptr in MMU invalidation notifier
    
    To be secure, when a userptr is invalidated the pages should be dma
    unmapped ensuring the device can no longer touch the invalidated pages.
    
    v2:
     - Don't free sg table in MMU notifer, just dma unmap pages
    
    Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
    Fixes: 12f4b58a37f4 ("drm/xe: Use hmm_range_fault to populate user pages")
    Cc: Thomas Hellström <thomas.hellstrom at linux.intel.com>
    Cc: stable at vger.kernel.org # 6.8
    Signed-off-by: Matthew Brost <matthew.brost at intel.com>
+ /mt/dim checkpatch 4f88a4cc3d4cba837cf1f8040f0140583f204225 drm-intel
fd303e5703bc drm/xe: Unmap userptr in MMU invalidation notifier
-:32: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#32: FILE: drivers/gpu/drm/xe/xe_hmm.c:116:
+#define clear_need_unmap(__sg)	(__sg) = (struct sg_table *)((u64)(__sg) & ~0x1ull)

-:32: CHECK:MACRO_ARG_REUSE: Macro argument reuse '__sg' - possible side-effects?
#32: FILE: drivers/gpu/drm/xe/xe_hmm.c:116:
+#define clear_need_unmap(__sg)	(__sg) = (struct sg_table *)((u64)(__sg) & ~0x1ull)

-:33: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#33: FILE: drivers/gpu/drm/xe/xe_hmm.c:117:
+#define set_need_unmap(__sg)	(__sg) = (struct sg_table *)((u64)(__sg) | 0x1ull)

-:33: CHECK:MACRO_ARG_REUSE: Macro argument reuse '__sg' - possible side-effects?
#33: FILE: drivers/gpu/drm/xe/xe_hmm.c:117:
+#define set_need_unmap(__sg)	(__sg) = (struct sg_table *)((u64)(__sg) | 0x1ull)

-:149: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#149: FILE: drivers/gpu/drm/xe/xe_vm_types.h:37:
+#define vma_to_userptr_sg(__vma) \
+	(struct sg_table *)((u64)to_userptr_vma((__vma))->userptr.sg & ~0x1ull)

total: 3 errors, 0 warnings, 2 checks, 114 lines checked




More information about the Intel-xe mailing list