[radeon-alex:amd-mainline-dkms-5.2 2104/2647] drivers/gpu/drm/ttm/ttm_bo_manager.c:60:7: error: variable 'sflags' has initializer but incomplete type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   git://people.freedesktop.org/~agd5f/linux.git amd-mainline-dkms-5.2
head:   b027ed8d9051470f4ed6bc071fcde172fe1fc595
commit: 769e4dc19ad658720b779070764db2fc10a0bbac [2104/2647] drm/amdkcl: Test whether drm_mm_insert_mode is available
config: x86_64-randconfig-g002-201943 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
        git checkout 769e4dc19ad658720b779070764db2fc10a0bbac
        # 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 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_manager.c: In function 'ttm_bo_man_get_node':
>> drivers/gpu/drm/ttm/ttm_bo_manager.c:60:7: error: variable 'sflags' has initializer but incomplete type
     enum drm_mm_search_flags sflags = DRM_MM_SEARCH_BEST;
          ^~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/ttm/ttm_bo_manager.c:60:36: error: 'DRM_MM_SEARCH_BEST' undeclared (first use in this function); did you mean 'DRM_MM_INSERT_BEST'?
     enum drm_mm_search_flags sflags = DRM_MM_SEARCH_BEST;
                                       ^~~~~~~~~~~~~~~~~~
                                       DRM_MM_INSERT_BEST
   drivers/gpu/drm/ttm/ttm_bo_manager.c:60:36: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/gpu/drm/ttm/ttm_bo_manager.c:60:27: error: storage size of 'sflags' isn't known
     enum drm_mm_search_flags sflags = DRM_MM_SEARCH_BEST;
                              ^~~~~~
>> drivers/gpu/drm/ttm/ttm_bo_manager.c:61:7: error: variable 'aflags' has initializer but incomplete type
     enum drm_mm_allocator_flags aflags = DRM_MM_CREATE_DEFAULT;
          ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/ttm/ttm_bo_manager.c:61:39: error: 'DRM_MM_CREATE_DEFAULT' undeclared (first use in this function); did you mean 'DRM_MODE_TYPE_DEFAULT'?
     enum drm_mm_allocator_flags aflags = DRM_MM_CREATE_DEFAULT;
                                          ^~~~~~~~~~~~~~~~~~~~~
                                          DRM_MODE_TYPE_DEFAULT
>> drivers/gpu/drm/ttm/ttm_bo_manager.c:61:30: error: storage size of 'aflags' isn't known
     enum drm_mm_allocator_flags aflags = DRM_MM_CREATE_DEFAULT;
                                 ^~~~~~
>> drivers/gpu/drm/ttm/ttm_bo_manager.c:78:12: error: 'DRM_MM_SEARCH_BELOW' undeclared (first use in this function); did you mean 'DRM_MM_SEARCH_BEST'?
      sflags = DRM_MM_SEARCH_BELOW;
               ^~~~~~~~~~~~~~~~~~~
               DRM_MM_SEARCH_BEST
>> drivers/gpu/drm/ttm/ttm_bo_manager.c:79:12: error: 'DRM_MM_CREATE_TOP' undeclared (first use in this function); did you mean 'DRM_MM_CREATE_DEFAULT'?
      aflags = DRM_MM_CREATE_TOP;
               ^~~~~~~~~~~~~~~~~
               DRM_MM_CREATE_DEFAULT
>> drivers/gpu/drm/ttm/ttm_bo_manager.c:89:8: error: implicit declaration of function 'drm_mm_insert_node_in_range_generic'; did you mean 'drm_mm_insert_node_in_range'? [-Werror=implicit-function-declaration]
     ret = drm_mm_insert_node_in_range_generic(mm, node, mem->num_pages,
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           drm_mm_insert_node_in_range
   drivers/gpu/drm/ttm/ttm_bo_manager.c:61:30: warning: unused variable 'aflags' [-Wunused-variable]
     enum drm_mm_allocator_flags aflags = DRM_MM_CREATE_DEFAULT;
                                 ^~~~~~
   drivers/gpu/drm/ttm/ttm_bo_manager.c:60:27: warning: unused variable 'sflags' [-Wunused-variable]
     enum drm_mm_search_flags sflags = DRM_MM_SEARCH_BEST;
                              ^~~~~~
   drivers/gpu/drm/ttm/ttm_bo_manager.c: In function 'ttm_bo_man_debug':
   drivers/gpu/drm/ttm/ttm_bo_manager.c:165:26: error: passing argument 2 of 'drm_mm_print' from incompatible pointer type [-Werror=incompatible-pointer-types]
     drm_mm_print(&rman->mm, printer);
                             ^~~~~~~
   In file included from include/drm/drm_vma_manager.h:26:0,
                    from include/kcl/kcl_drm_vma_manager.h:8,
                    from drivers/gpu/drm/ttm/backport/backport.h:5,
                    from <command-line>:0:
   include/drm/drm_mm.h:547:6: note: expected 'struct drm_printer *' but argument is of type 'struct drm_printer *'
    void drm_mm_print(const struct drm_mm *mm, struct drm_printer *p);
         ^~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/sflags +60 drivers/gpu/drm/ttm/ttm_bo_manager.c

    50	
    51	static int ttm_bo_man_get_node(struct ttm_mem_type_manager *man,
    52				       struct ttm_buffer_object *bo,
    53				       const struct ttm_place *place,
    54				       struct ttm_mem_reg *mem)
    55	{
    56		struct ttm_range_manager *rman = (struct ttm_range_manager *) man->priv;
    57		struct drm_mm *mm = &rman->mm;
    58		struct drm_mm_node *node;
    59	#ifndef HAVE_DRM_MM_INSERT_MODE
  > 60		enum drm_mm_search_flags sflags = DRM_MM_SEARCH_BEST;
  > 61		enum drm_mm_allocator_flags aflags = DRM_MM_CREATE_DEFAULT;
    62	#else
    63		enum drm_mm_insert_mode mode;
    64	#endif
    65		unsigned long lpfn;
    66		int ret;
    67	
    68		lpfn = place->lpfn;
    69		if (!lpfn)
    70			lpfn = man->size;
    71	
    72		node = kzalloc(sizeof(*node), GFP_KERNEL);
    73		if (!node)
    74			return -ENOMEM;
    75	
    76	#ifndef HAVE_DRM_MM_INSERT_MODE
    77		if (place->flags & TTM_PL_FLAG_TOPDOWN) {
  > 78			sflags = DRM_MM_SEARCH_BELOW;
  > 79			aflags = DRM_MM_CREATE_TOP;
    80		}
    81	#else
    82		mode = DRM_MM_INSERT_BEST;
    83		if (place->flags & TTM_PL_FLAG_TOPDOWN)
    84			mode = DRM_MM_INSERT_HIGH;
    85	#endif
    86	
    87		spin_lock(&rman->lock);
    88	#ifndef HAVE_DRM_MM_INSERT_MODE
  > 89		ret = drm_mm_insert_node_in_range_generic(mm, node, mem->num_pages,
    90						  mem->page_alignment, 0,
    91						  place->fpfn, lpfn,
    92						  sflags, aflags);
    93	#else
    94		ret = drm_mm_insert_node_in_range(mm, node,
    95						  mem->num_pages,
    96						  mem->page_alignment, 0,
    97						  place->fpfn, lpfn, mode);
    98	#endif
    99	
   100		spin_unlock(&rman->lock);
   101	
   102		if (unlikely(ret)) {
   103			kfree(node);
   104		} else {
   105			mem->mm_node = node;
   106			mem->start = node->start;
   107		}
   108	
   109		return 0;
   110	}
   111	

---
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

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux