[radeon-alex:amd-mainline-dkms-5.2 2114/2834] drivers/gpu/drm/ttm/ttm_bo_manager.c:170:2: error: implicit declaration of function 'drm_mm_debug_table'
kbuild test robot
lkp at intel.com
Mon Nov 11 17:05:57 UTC 2019
tree: git://people.freedesktop.org/~agd5f/linux.git amd-mainline-dkms-5.2
head: a48b0cc1cdf3900e3e73801f9de64afbb70dc193
commit: 57d7e98d0257bd9795dd3f438d19aa5476554685 [2114/2834] drm/amdkcl: Test whether drm_{mm_print/debug_printer} is available
config: x86_64-randconfig-a004-201944 (attached as .config)
compiler: gcc-5 (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010
reproduce:
git checkout 57d7e98d0257bd9795dd3f438d19aa5476554685
# 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 at intel.com>
All errors (new ones prefixed by >>):
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' [-Werror=implicit-function-declaration]
err = vm_insert_mixed(vma, addr, pfn_t_to_pfn(pfn));
^
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' [-Werror=implicit-function-declaration]
int err = vm_insert_pfn(vma, addr, 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)
enum drm_mm_search_flags sflags = DRM_MM_SEARCH_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)
enum drm_mm_allocator_flags aflags = DRM_MM_CREATE_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)
sflags = DRM_MM_SEARCH_BELOW;
^
drivers/gpu/drm/ttm/ttm_bo_manager.c:79:12: error: 'DRM_MM_CREATE_TOP' undeclared (first use in this function)
aflags = DRM_MM_CREATE_TOP;
^
drivers/gpu/drm/ttm/ttm_bo_manager.c:89:8: error: implicit declaration of function 'drm_mm_insert_node_in_range_generic' [-Werror=implicit-function-declaration]
ret = drm_mm_insert_node_in_range_generic(mm, node, mem->num_pages,
^
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:170:2: error: implicit declaration of function 'drm_mm_debug_table' [-Werror=implicit-function-declaration]
drm_mm_debug_table(&rman->mm, prefix);
^
drivers/gpu/drm/ttm/ttm_bo_manager.c: At top level:
drivers/gpu/drm/ttm/ttm_bo_manager.c:182:11: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.debug = ttm_bo_man_debug
^
drivers/gpu/drm/ttm/ttm_bo_manager.c:182:11: note: (near initialization for 'ttm_bo_manager_func.debug')
cc1: some warnings being treated as errors
vim +/drm_mm_debug_table +170 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
112 static void ttm_bo_man_put_node(struct ttm_mem_type_manager *man,
113 struct ttm_mem_reg *mem)
114 {
115 struct ttm_range_manager *rman = (struct ttm_range_manager *) man->priv;
116
117 if (mem->mm_node) {
118 spin_lock(&rman->lock);
119 drm_mm_remove_node(mem->mm_node);
120 spin_unlock(&rman->lock);
121
122 kfree(mem->mm_node);
123 mem->mm_node = NULL;
124 }
125 }
126
127 static int ttm_bo_man_init(struct ttm_mem_type_manager *man,
128 unsigned long p_size)
129 {
130 struct ttm_range_manager *rman;
131
132 rman = kzalloc(sizeof(*rman), GFP_KERNEL);
133 if (!rman)
134 return -ENOMEM;
135
136 drm_mm_init(&rman->mm, 0, p_size);
137 spin_lock_init(&rman->lock);
138 man->priv = rman;
139 return 0;
140 }
141
142 static int ttm_bo_man_takedown(struct ttm_mem_type_manager *man)
143 {
144 struct ttm_range_manager *rman = (struct ttm_range_manager *) man->priv;
145 struct drm_mm *mm = &rman->mm;
146
147 spin_lock(&rman->lock);
148 if (drm_mm_clean(mm)) {
149 drm_mm_takedown(mm);
150 spin_unlock(&rman->lock);
151 kfree(rman);
152 man->priv = NULL;
153 return 0;
154 }
155 spin_unlock(&rman->lock);
156 return -EBUSY;
157 }
158
159 static void ttm_bo_man_debug(struct ttm_mem_type_manager *man,
160 #if !defined(HAVE_DRM_MM_PRINT)
161 const char *prefix)
162 #else
163 struct drm_printer *printer)
164 #endif
165 {
166 struct ttm_range_manager *rman = (struct ttm_range_manager *) man->priv;
167
168 spin_lock(&rman->lock);
169 #if !defined(HAVE_DRM_MM_PRINT)
> 170 drm_mm_debug_table(&rman->mm, prefix);
171 #else
172 drm_mm_print(&rman->mm, printer);
173 #endif
174 spin_unlock(&rman->lock);
175 }
176
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 35907 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20191112/5ab2af71/attachment-0001.gz>
More information about the dri-devel
mailing list