tree: git://people.freedesktop.org/~agd5f/linux.git amd-mainline-dkms-5.2 head: b027ed8d9051470f4ed6bc071fcde172fe1fc595 commit: 3ba40228e28c15ca2dfec398cd7e5ebebdb5a9c2 [2082/2647] drm/amdkcl: Test whether vmf_insert_*() functions are available config: x86_64-randconfig-g002-201943 (attached as .config) compiler: gcc-7 (Debian 7.4.0-14) 7.4.0 reproduce: git checkout 3ba40228e28c15ca2dfec398cd7e5ebebdb5a9c2 # save the attached .config to linux build tree make ARCH=x86_64 If you fix the issue, kindly add following tag Reported-by: kbuild test robot <lkp@xxxxxxxxx> All errors (new ones prefixed by >>): from <command-line>:0: include/linux/mm.h:663:13: note: previous declaration of 'kvfree' was here extern void kvfree(const void *addr); ^~~~~~ In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0, from <command-line>:0: include/kcl/kcl_mm.h:104:21: error: redefinition of 'kvmalloc_array' static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags) ^~~~~~~~~~~~~~ In file included from include/drm/drm_vma_manager.h:27:0, from include/kcl/kcl_drm_vma_manager.h:8, from drivers/gpu/drm/ttm/backport/backport.h:5, from <command-line>:0: include/linux/mm.h:648:21: note: previous definition of 'kvmalloc_array' was here static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags) ^~~~~~~~~~~~~~ In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0, from <command-line>:0: include/kcl/kcl_mm.h:117:21: error: redefinition of 'kvcalloc' static inline void *kvcalloc(size_t n, size_t size, gfp_t flags) ^~~~~~~~ In file included from include/drm/drm_vma_manager.h:27:0, from include/kcl/kcl_drm_vma_manager.h:8, from drivers/gpu/drm/ttm/backport/backport.h:5, from <command-line>:0: include/linux/mm.h:658:21: note: previous definition of 'kvcalloc' was here static inline void *kvcalloc(size_t n, size_t size, gfp_t flags) ^~~~~~~~ In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0, from <command-line>:0: include/kcl/kcl_fence.h:161:20: error: redefinition of 'dma_fence_set_error' static inline void dma_fence_set_error(struct dma_fence *fence, ^~~~~~~~~~~~~~~~~~~ In file included from include/drm/drmP.h:58:0, from include/kcl/kcl_drm.h:6, from drivers/gpu/drm/ttm/backport/backport.h:6, from <command-line>:0: include/linux/dma-fence.h:517:20: note: previous definition of 'dma_fence_set_error' was here static inline void dma_fence_set_error(struct dma_fence *fence, ^~~~~~~~~~~~~~~~~~~ In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0, from <command-line>:0: include/kcl/kcl_fence.h: In function 'dma_fence_set_error': include/kcl/kcl_fence.h:167:7: error: 'struct dma_fence' has no member named 'status' fence->status = error; ^~ In file included from drivers/gpu/drm/ttm/backport/backport.h:10:0, from <command-line>:0: include/kcl/kcl_list.h: At top level: include/kcl/kcl_list.h:6:20: error: redefinition of 'list_bulk_move_tail' static inline void list_bulk_move_tail(struct list_head *head, ^~~~~~~~~~~~~~~~~~~ In file included from include/linux/preempt.h:11:0, from include/linux/rcupdate.h:27, from include/linux/rbtree.h:34, from include/drm/drm_mm.h:41, from include/drm/drm_vma_manager.h:26, from include/kcl/kcl_drm_vma_manager.h:8, from drivers/gpu/drm/ttm/backport/backport.h:5, from <command-line>:0: include/linux/list.h:212:20: note: previous definition of 'list_bulk_move_tail' was here static inline void list_bulk_move_tail(struct list_head *head, ^~~~~~~~~~~~~~~~~~~ In file included from drivers/gpu/drm/ttm/backport/backport.h:11:0, from <command-line>:0: include/kcl/kcl_kref.h:7:28: error: redefinition of 'kref_read' static inline unsigned int kref_read(const struct kref *kref) ^~~~~~~~~ In file included from include/linux/kobject.h:23:0, from include/linux/device.h:16, from include/drm/drm_print.h:32, from include/drm/drm_mm.h:49, from include/drm/drm_vma_manager.h:26, from include/kcl/kcl_drm_vma_manager.h:8, from drivers/gpu/drm/ttm/backport/backport.h:5, from <command-line>:0: include/linux/kref.h:36:28: note: previous definition of 'kref_read' was here static inline unsigned int kref_read(const struct kref *kref) ^~~~~~~~~ In file included from drivers/gpu/drm/ttm/backport/backport.h:11:0, from <command-line>:0: include/kcl/kcl_kref.h: In function 'kref_read': include/kcl/kcl_kref.h:9:21: error: passing argument 1 of 'atomic_read' from incompatible pointer type [-Werror=incompatible-pointer-types] return atomic_read(&kref->refcount); ^ In file included from arch/x86/include/asm/atomic.h:265:0, from include/linux/atomic.h:7, from include/linux/rcupdate.h:25, from include/linux/rbtree.h:34, from include/drm/drm_mm.h:41, from include/drm/drm_vma_manager.h:26, from include/kcl/kcl_drm_vma_manager.h:8, from drivers/gpu/drm/ttm/backport/backport.h:5, from <command-line>:0: include/asm-generic/atomic-instrumented.h:24:1: note: expected 'const atomic_t * {aka const struct <anonymous> *}' but argument is of type 'const refcount_t * {aka const struct refcount_struct *}' atomic_read(const atomic_t *v) ^~~~~~~~~~~ In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0, from <command-line>:0: include/kcl/kcl_mm_types.h: At top level: >> include/kcl/kcl_mm_types.h:10:3: error: conflicting types for 'pfn_t' } pfn_t; ^~~~~ In file included from include/asm-generic/memory_model.h:5:0, from arch/x86/include/asm/page.h:76, from arch/x86/include/asm/thread_info.h:12, from include/linux/thread_info.h:38, from arch/x86/include/asm/preempt.h:7, from include/linux/preempt.h:78, from include/linux/rcupdate.h:27, from include/linux/rbtree.h:34, from include/drm/drm_mm.h:41, from include/drm/drm_vma_manager.h:26, from include/kcl/kcl_drm_vma_manager.h:8, from drivers/gpu/drm/ttm/backport/backport.h:5, from <command-line>:0: include/linux/pfn.h:15:3: note: previous declaration of 'pfn_t' was here } pfn_t; ^~~~~ In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0, from <command-line>:0: >> include/kcl/kcl_mm_types.h:33:13: error: conflicting types for 'vm_fault_t' typedef int vm_fault_t; ^~~~~~~~~~ In file included from include/drm/drm_mm.h:43:0, from include/drm/drm_vma_manager.h:26, from include/kcl/kcl_drm_vma_manager.h:8, from drivers/gpu/drm/ttm/backport/backport.h:5, from <command-line>:0: include/linux/mm_types.h:631:32: note: previous declaration of 'vm_fault_t' was here typedef __bitwise unsigned int vm_fault_t; ^~~~~~~~~~ In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0, from <command-line>:0: >> include/kcl/kcl_mm_types.h:35:26: error: conflicting types for 'vmf_insert_mixed' static inline vm_fault_t vmf_insert_mixed(struct vm_area_struct *vma, ^~~~~~~~~~~~~~~~ In file included from include/drm/drm_vma_manager.h:27:0, from include/kcl/kcl_drm_vma_manager.h:8, from drivers/gpu/drm/ttm/backport/backport.h:5, from <command-line>:0: include/linux/mm.h:2587:12: note: previous declaration of 'vmf_insert_mixed' was here vm_fault_t vmf_insert_mixed(struct vm_area_struct *vma, unsigned long addr, ^~~~~~~~~~~~~~~~ In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0, from <command-line>:0: include/kcl/kcl_mm_types.h: In function 'vmf_insert_mixed': >> include/kcl/kcl_mm_types.h:41:8: error: implicit declaration of function 'vm_insert_mixed'; did you mean 'vmf_insert_mixed'? [-Werror=implicit-function-declaration] err = vm_insert_mixed(vma, addr, pfn_t_to_pfn(pfn)); ^~~~~~~~~~~~~~~ vmf_insert_mixed include/kcl/kcl_mm_types.h: At top level: >> include/kcl/kcl_mm_types.h:53:26: error: conflicting types for 'vmf_insert_pfn' static inline vm_fault_t vmf_insert_pfn(struct vm_area_struct *vma, ^~~~~~~~~~~~~~ In file included from include/drm/drm_vma_manager.h:27:0, from include/kcl/kcl_drm_vma_manager.h:8, from drivers/gpu/drm/ttm/backport/backport.h:5, from <command-line>:0: include/linux/mm.h:2583:12: note: previous declaration of 'vmf_insert_pfn' was here vm_fault_t vmf_insert_pfn(struct vm_area_struct *vma, unsigned long addr, ^~~~~~~~~~~~~~ In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0, from <command-line>:0: include/kcl/kcl_mm_types.h: In function 'vmf_insert_pfn': >> include/kcl/kcl_mm_types.h:56:13: error: implicit declaration of function 'vm_insert_pfn'; did you mean 'vmf_insert_pfn'? [-Werror=implicit-function-declaration] int err = vm_insert_pfn(vma, addr, pfn); ^~~~~~~~~~~~~ vmf_insert_pfn cc1: some warnings being treated as errors -- from <command-line>:0: include/linux/mm.h:663:13: note: previous declaration of 'kvfree' was here extern void kvfree(const void *addr); ^~~~~~ In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0, from <command-line>:0: include/kcl/kcl_mm.h:104:21: error: redefinition of 'kvmalloc_array' static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags) ^~~~~~~~~~~~~~ In file included from include/drm/drm_vma_manager.h:27:0, from include/kcl/kcl_drm_vma_manager.h:8, from drivers/gpu/drm/ttm/backport/backport.h:5, from <command-line>:0: include/linux/mm.h:648:21: note: previous definition of 'kvmalloc_array' was here static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags) ^~~~~~~~~~~~~~ In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0, from <command-line>:0: include/kcl/kcl_mm.h:117:21: error: redefinition of 'kvcalloc' static inline void *kvcalloc(size_t n, size_t size, gfp_t flags) ^~~~~~~~ In file included from include/drm/drm_vma_manager.h:27:0, from include/kcl/kcl_drm_vma_manager.h:8, from drivers/gpu/drm/ttm/backport/backport.h:5, from <command-line>:0: include/linux/mm.h:658:21: note: previous definition of 'kvcalloc' was here static inline void *kvcalloc(size_t n, size_t size, gfp_t flags) ^~~~~~~~ In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0, from <command-line>:0: include/kcl/kcl_fence.h:161:20: error: redefinition of 'dma_fence_set_error' static inline void dma_fence_set_error(struct dma_fence *fence, ^~~~~~~~~~~~~~~~~~~ In file included from include/drm/drmP.h:58:0, from include/kcl/kcl_drm.h:6, from drivers/gpu/drm/ttm/backport/backport.h:6, from <command-line>:0: include/linux/dma-fence.h:517:20: note: previous definition of 'dma_fence_set_error' was here static inline void dma_fence_set_error(struct dma_fence *fence, ^~~~~~~~~~~~~~~~~~~ In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0, from <command-line>:0: include/kcl/kcl_fence.h: In function 'dma_fence_set_error': include/kcl/kcl_fence.h:167:7: error: 'struct dma_fence' has no member named 'status' fence->status = error; ^~ In file included from drivers/gpu/drm/ttm/backport/backport.h:10:0, from <command-line>:0: include/kcl/kcl_list.h: At top level: include/kcl/kcl_list.h:6:20: error: redefinition of 'list_bulk_move_tail' static inline void list_bulk_move_tail(struct list_head *head, ^~~~~~~~~~~~~~~~~~~ In file included from include/linux/preempt.h:11:0, from include/linux/rcupdate.h:27, from include/linux/rbtree.h:34, from include/drm/drm_mm.h:41, from include/drm/drm_vma_manager.h:26, from include/kcl/kcl_drm_vma_manager.h:8, from drivers/gpu/drm/ttm/backport/backport.h:5, from <command-line>:0: include/linux/list.h:212:20: note: previous definition of 'list_bulk_move_tail' was here static inline void list_bulk_move_tail(struct list_head *head, ^~~~~~~~~~~~~~~~~~~ In file included from drivers/gpu/drm/ttm/backport/backport.h:11:0, from <command-line>:0: include/kcl/kcl_kref.h:7:28: error: redefinition of 'kref_read' static inline unsigned int kref_read(const struct kref *kref) ^~~~~~~~~ In file included from include/linux/kobject.h:23:0, from include/linux/device.h:16, from include/drm/drm_print.h:32, from include/drm/drm_mm.h:49, from include/drm/drm_vma_manager.h:26, from include/kcl/kcl_drm_vma_manager.h:8, from drivers/gpu/drm/ttm/backport/backport.h:5, from <command-line>:0: include/linux/kref.h:36:28: note: previous definition of 'kref_read' was here static inline unsigned int kref_read(const struct kref *kref) ^~~~~~~~~ In file included from drivers/gpu/drm/ttm/backport/backport.h:11:0, from <command-line>:0: include/kcl/kcl_kref.h: In function 'kref_read': include/kcl/kcl_kref.h:9:21: error: passing argument 1 of 'atomic_read' from incompatible pointer type [-Werror=incompatible-pointer-types] return atomic_read(&kref->refcount); ^ In file included from arch/x86/include/asm/atomic.h:265:0, from include/linux/atomic.h:7, from include/linux/rcupdate.h:25, from include/linux/rbtree.h:34, from include/drm/drm_mm.h:41, from include/drm/drm_vma_manager.h:26, from include/kcl/kcl_drm_vma_manager.h:8, from drivers/gpu/drm/ttm/backport/backport.h:5, from <command-line>:0: include/asm-generic/atomic-instrumented.h:24:1: note: expected 'const atomic_t * {aka const struct <anonymous> *}' but argument is of type 'const refcount_t * {aka const struct refcount_struct *}' atomic_read(const atomic_t *v) ^~~~~~~~~~~ In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0, from <command-line>:0: include/kcl/kcl_mm_types.h: At top level: >> include/kcl/kcl_mm_types.h:10:3: error: conflicting types for 'pfn_t' } pfn_t; ^~~~~ In file included from include/asm-generic/memory_model.h:5:0, from arch/x86/include/asm/page.h:76, from arch/x86/include/asm/thread_info.h:12, from include/linux/thread_info.h:38, from arch/x86/include/asm/preempt.h:7, from include/linux/preempt.h:78, from include/linux/rcupdate.h:27, from include/linux/rbtree.h:34, from include/drm/drm_mm.h:41, from include/drm/drm_vma_manager.h:26, from include/kcl/kcl_drm_vma_manager.h:8, from drivers/gpu/drm/ttm/backport/backport.h:5, from <command-line>:0: include/linux/pfn.h:15:3: note: previous declaration of 'pfn_t' was here } pfn_t; ^~~~~ In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0, from <command-line>:0: >> include/kcl/kcl_mm_types.h:33:13: error: conflicting types for 'vm_fault_t' typedef int vm_fault_t; ^~~~~~~~~~ In file included from include/drm/drm_mm.h:43:0, from include/drm/drm_vma_manager.h:26, from include/kcl/kcl_drm_vma_manager.h:8, from drivers/gpu/drm/ttm/backport/backport.h:5, from <command-line>:0: include/linux/mm_types.h:631:32: note: previous declaration of 'vm_fault_t' was here typedef __bitwise unsigned int vm_fault_t; ^~~~~~~~~~ In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0, from <command-line>:0: >> include/kcl/kcl_mm_types.h:35:26: error: conflicting types for 'vmf_insert_mixed' static inline vm_fault_t vmf_insert_mixed(struct vm_area_struct *vma, ^~~~~~~~~~~~~~~~ In file included from include/drm/drm_vma_manager.h:27:0, from include/kcl/kcl_drm_vma_manager.h:8, from drivers/gpu/drm/ttm/backport/backport.h:5, from <command-line>:0: include/linux/mm.h:2587:12: note: previous declaration of 'vmf_insert_mixed' was here vm_fault_t vmf_insert_mixed(struct vm_area_struct *vma, unsigned long addr, ^~~~~~~~~~~~~~~~ In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0, from <command-line>:0: include/kcl/kcl_mm_types.h: In function 'vmf_insert_mixed': >> include/kcl/kcl_mm_types.h:41:8: error: implicit declaration of function 'vm_insert_mixed'; did you mean 'vmf_insert_mixed'? [-Werror=implicit-function-declaration] err = vm_insert_mixed(vma, addr, pfn_t_to_pfn(pfn)); ^~~~~~~~~~~~~~~ vmf_insert_mixed include/kcl/kcl_mm_types.h: At top level: >> include/kcl/kcl_mm_types.h:53:26: error: conflicting types for 'vmf_insert_pfn' static inline vm_fault_t vmf_insert_pfn(struct vm_area_struct *vma, ^~~~~~~~~~~~~~ In file included from include/drm/drm_vma_manager.h:27:0, from include/kcl/kcl_drm_vma_manager.h:8, from drivers/gpu/drm/ttm/backport/backport.h:5, from <command-line>:0: include/linux/mm.h:2583:12: note: previous declaration of 'vmf_insert_pfn' was here vm_fault_t vmf_insert_pfn(struct vm_area_struct *vma, unsigned long addr, ^~~~~~~~~~~~~~ In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0, from <command-line>:0: include/kcl/kcl_mm_types.h: In function 'vmf_insert_pfn': >> include/kcl/kcl_mm_types.h:56:13: error: implicit declaration of function 'vm_insert_pfn'; did you mean 'vmf_insert_pfn'? [-Werror=implicit-function-declaration] int err = vm_insert_pfn(vma, addr, pfn); ^~~~~~~~~~~~~ vmf_insert_pfn drivers/gpu/drm/ttm/ttm_bo.c: In function 'ttm_bo_mem_space_debug': drivers/gpu/drm/ttm/ttm_bo.c:101:25: error: invalid initializer struct drm_printer p = drm_debug_printer(TTM_PFX); ^~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors .. vim +/pfn_t +10 include/kcl/kcl_mm_types.h 3 4 #include <linux/mm.h> 5 #ifdef HAVE_PFN_T 6 #include <linux/pfn_t.h> 7 #else 8 typedef struct { 9 u64 val; > 10 } pfn_t; 11 12 #define PFN_FLAGS_MASK (((unsigned long) ~PAGE_MASK) \ 13 << (BITS_PER_LONG - PAGE_SHIFT)) 14 #define PFN_SG_CHAIN (1UL << (BITS_PER_LONG - 1)) 15 #define PFN_SG_LAST (1UL << (BITS_PER_LONG - 2)) 16 #define PFN_DEV (1UL << (BITS_PER_LONG - 3)) 17 #define PFN_MAP (1UL << (BITS_PER_LONG - 4)) 18 19 static inline pfn_t __pfn_to_pfn_t(unsigned long pfn, unsigned long flags) 20 { 21 pfn_t pfn_t = { .val = pfn | (flags & PFN_FLAGS_MASK), }; 22 23 return pfn_t; 24 } 25 26 static inline unsigned long pfn_t_to_pfn(pfn_t pfn) 27 { 28 return pfn.val & ~PFN_FLAGS_MASK; 29 } 30 #endif 31 32 #ifndef HAVE_VMF_INSERT > 33 typedef int vm_fault_t; 34 > 35 static inline vm_fault_t vmf_insert_mixed(struct vm_area_struct *vma, 36 unsigned long addr, 37 pfn_t pfn) 38 { 39 int err; 40 #if !defined(HAVE_PFN_T_VM_INSERT_MIXED) > 41 err = vm_insert_mixed(vma, addr, pfn_t_to_pfn(pfn)); 42 #else 43 err = vm_insert_mixed(vma, addr, pfn); 44 #endif 45 if (err == -ENOMEM) 46 return VM_FAULT_OOM; 47 if (err < 0 && err != -EBUSY) 48 return VM_FAULT_SIGBUS; 49 50 return VM_FAULT_NOPAGE; 51 } 52 > 53 static inline vm_fault_t vmf_insert_pfn(struct vm_area_struct *vma, 54 unsigned long addr, unsigned long pfn) 55 { > 56 int err = vm_insert_pfn(vma, addr, pfn); 57 58 if (err == -ENOMEM) 59 return VM_FAULT_OOM; 60 if (err < 0 && err != -EBUSY) 61 return VM_FAULT_SIGBUS; 62 63 return VM_FAULT_NOPAGE; 64 } 65 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip
_______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel