[radeon-alex:amd-mainline-dkms-5.0 3697/3778] drivers/gpu//drm/ttm/ttm_bo_util.c:305:43: error: macro "kmap_atomic_prot" passed 3 arguments, but takes just 2
kbuild test robot
lkp at intel.com
Tue Sep 24 18:54:01 UTC 2019
Hi Flora,
FYI, the error/warning still remains.
tree: git://people.freedesktop.org/~agd5f/linux.git amd-mainline-dkms-5.0
head: 71c434dfdbe847b6d8a645cb90ae2685f284b092
commit: f460c248a3f0bca3a875602cf40693de672485c4 [3697/3778] drm/amd/autoconf: refactor dma_fence header check
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-13) 7.4.0
reproduce:
git checkout f460c248a3f0bca3a875602cf40693de672485c4
# 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 >>):
from include/linux/dma-mapping.h:11,
from include/drm/drmP.h:37,
from include/kcl/kcl_drm.h:6,
from drivers/gpu//drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/linux/mm.h:610:21: note: previous definition of 'kvzalloc' was here
static inline void *kvzalloc(size_t size, gfp_t flags)
^~~~~~~~
In file included from drivers/gpu//drm/ttm/backport/backport.h:12:0,
from <command-line>:0:
include/kcl/kcl_mm.h:74:20: error: static declaration of 'kvfree' follows non-static declaration
static inline void kvfree(const void *addr)
^~~~~~
In file included from include/linux/scatterlist.h:8:0,
from include/linux/dma-mapping.h:11,
from include/drm/drmP.h:37,
from include/kcl/kcl_drm.h:6,
from drivers/gpu//drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/linux/mm.h:630: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:12:0,
from <command-line>:0:
include/kcl/kcl_mm.h:94: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/linux/scatterlist.h:8:0,
from include/linux/dma-mapping.h:11,
from include/drm/drmP.h:37,
from include/kcl/kcl_drm.h:6,
from drivers/gpu//drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/linux/mm.h:615: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:12:0,
from <command-line>:0:
include/kcl/kcl_mm.h:107:21: error: redefinition of 'kvcalloc'
static inline void *kvcalloc(size_t n, size_t size, gfp_t flags)
^~~~~~~~
In file included from include/linux/scatterlist.h:8:0,
from include/linux/dma-mapping.h:11,
from include/drm/drmP.h:37,
from include/kcl/kcl_drm.h:6,
from drivers/gpu//drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/linux/mm.h:625: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:12:0,
from <command-line>:0:
include/kcl/kcl_mm.h:114:20: error: redefinition of 'mmgrab'
static inline void mmgrab(struct mm_struct *mm)
^~~~~~
In file included from include/kcl/kcl_mm.h:6:0,
from drivers/gpu//drm/ttm/backport/backport.h:12,
from <command-line>:0:
include/linux/sched/mm.h:34:20: note: previous definition of 'mmgrab' was here
static inline void mmgrab(struct mm_struct *mm)
^~~~~~
In file included from drivers/gpu//drm/ttm/backport/backport.h:13:0,
from <command-line>:0:
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/wait.h:7:0,
from include/linux/dma-fence.h:25,
from include/kcl/kcl_fence.h:9,
from drivers/gpu//drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/list.h:195:20: note: previous definition of 'list_bulk_move_tail' was here
static inline void list_bulk_move_tail(struct list_head *head,
^~~~~~~~~~~~~~~~~~~
drivers/gpu//drm/ttm/ttm_bo_util.c: In function 'ttm_kmap_atomic_prot':
drivers/gpu//drm/ttm/ttm_bo_util.c:265:57: error: 'KM_USER0' undeclared (first use in this function); did you mean 'SI_USER'?
#define __kcl__kmap_atomic(__page) kmap_atomic(__page, KM_USER0)
^
drivers/gpu//drm/ttm/ttm_bo_util.c:303:10: note: in expansion of macro '__kcl__kmap_atomic'
return __kcl__kmap_atomic(page);
^~~~~~~~~~~~~~~~~~
drivers/gpu//drm/ttm/ttm_bo_util.c:265:57: note: each undeclared identifier is reported only once for each function it appears in
#define __kcl__kmap_atomic(__page) kmap_atomic(__page, KM_USER0)
^
drivers/gpu//drm/ttm/ttm_bo_util.c:303:10: note: in expansion of macro '__kcl__kmap_atomic'
return __kcl__kmap_atomic(page);
^~~~~~~~~~~~~~~~~~
drivers/gpu//drm/ttm/ttm_bo_util.c:265:37: error: too many arguments to function 'kmap_atomic'
#define __kcl__kmap_atomic(__page) kmap_atomic(__page, KM_USER0)
^
drivers/gpu//drm/ttm/ttm_bo_util.c:303:10: note: in expansion of macro '__kcl__kmap_atomic'
return __kcl__kmap_atomic(page);
^~~~~~~~~~~~~~~~~~
In file included from include/drm/drmP.h:40:0,
from include/kcl/kcl_drm.h:6,
from drivers/gpu//drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/linux/highmem.h:91:21: note: declared here
static inline void *kmap_atomic(struct page *page)
^~~~~~~~~~~
>> drivers/gpu//drm/ttm/ttm_bo_util.c:305:43: error: macro "kmap_atomic_prot" passed 3 arguments, but takes just 2
return __ttm_kmap_atomic_prot(page, prot);
^
>> drivers/gpu//drm/ttm/ttm_bo_util.c:274:48: error: 'kmap_atomic_prot' undeclared (first use in this function); did you mean 'ttm_kmap_atomic_prot'?
#define __ttm_kmap_atomic_prot(__page, __prot) kmap_atomic_prot(__page, KM_USER0, __prot)
^
drivers/gpu//drm/ttm/ttm_bo_util.c:305:10: note: in expansion of macro '__ttm_kmap_atomic_prot'
return __ttm_kmap_atomic_prot(page, prot);
^~~~~~~~~~~~~~~~~~~~~~
drivers/gpu//drm/ttm/ttm_bo_util.c: In function 'ttm_kunmap_atomic_prot':
drivers/gpu//drm/ttm/ttm_bo_util.c:319:28: error: macro "kunmap_atomic" passed 2 arguments, but takes just 1
__kcl__kunmap_atomic(addr);
^
drivers/gpu//drm/ttm/ttm_bo_util.c:266:39: error: 'kunmap_atomic' undeclared (first use in this function); did you mean '__kunmap_atomic'?
#define __kcl__kunmap_atomic(__addr) kunmap_atomic(__addr, KM_USER0)
^
drivers/gpu//drm/ttm/ttm_bo_util.c:319:3: note: in expansion of macro '__kcl__kunmap_atomic'
__kcl__kunmap_atomic(addr);
^~~~~~~~~~~~~~~~~~~~
drivers/gpu//drm/ttm/ttm_bo_util.c:321:27: error: macro "kunmap_atomic" passed 2 arguments, but takes just 1
__ttm_kunmap_atomic(addr);
^
drivers/gpu//drm/ttm/ttm_bo_util.c: In function 'ttm_kmap_atomic_prot':
drivers/gpu//drm/ttm/ttm_bo_util.c:306:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
cc1: some warnings being treated as errors
vim +/kmap_atomic_prot +305 drivers/gpu//drm/ttm/ttm_bo_util.c
b479b92eb4e442 Yifan Zhang 2019-08-20 271
b479b92eb4e442 Yifan Zhang 2019-08-20 272 #ifdef CONFIG_X86
b479b92eb4e442 Yifan Zhang 2019-08-20 273 #if !defined(HAVE_KMAP_ATOMIC_ONE_ARG)
b479b92eb4e442 Yifan Zhang 2019-08-20 @274 #define __ttm_kmap_atomic_prot(__page, __prot) kmap_atomic_prot(__page, KM_USER0, __prot)
b479b92eb4e442 Yifan Zhang 2019-08-20 275 #define __ttm_kunmap_atomic(__addr) kunmap_atomic(__addr, KM_USER0)
b479b92eb4e442 Yifan Zhang 2019-08-20 276 #else
403c1826a45644 Thomas Hellstrom 2018-01-16 277 #define __ttm_kunmap_atomic(__addr) kunmap_atomic(__addr)
b479b92eb4e442 Yifan Zhang 2019-08-20 278 #define __ttm_kmap_atomic_prot(__page, __prot) kmap_atomic_prot(__page, __prot)
8c8a8e4c4df8cb Kevin Wang 2018-08-17 279 #endif
403c1826a45644 Thomas Hellstrom 2018-01-16 280 #else
403c1826a45644 Thomas Hellstrom 2018-01-16 281 #define __ttm_kmap_atomic_prot(__page, __prot) vmap(&__page, 1, 0, __prot)
403c1826a45644 Thomas Hellstrom 2018-01-16 282 #define __ttm_kunmap_atomic(__addr) vunmap(__addr)
403c1826a45644 Thomas Hellstrom 2018-01-16 283 #endif
403c1826a45644 Thomas Hellstrom 2018-01-16 284
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 285
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 286 /**
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 287 * ttm_kmap_atomic_prot - Efficient kernel map of a single page with
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 288 * specified page protection.
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 289 *
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 290 * @page: The page to map.
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 291 * @prot: The page protection.
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 292 *
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 293 * This function maps a TTM page using the kmap_atomic api if available,
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 294 * otherwise falls back to vmap. The user must make sure that the
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 295 * specified page does not have an aliased mapping with a different caching
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 296 * policy unless the architecture explicitly allows it. Also mapping and
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 297 * unmapping using this api must be correctly nested. Unmapping should
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 298 * occur in the reverse order of mapping.
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 299 */
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 300 void *ttm_kmap_atomic_prot(struct page *page, pgprot_t prot)
403c1826a45644 Thomas Hellstrom 2018-01-16 301 {
403c1826a45644 Thomas Hellstrom 2018-01-16 302 if (pgprot_val(prot) == pgprot_val(PAGE_KERNEL))
8c8a8e4c4df8cb Kevin Wang 2018-08-17 303 return __kcl__kmap_atomic(page);
403c1826a45644 Thomas Hellstrom 2018-01-16 304 else
403c1826a45644 Thomas Hellstrom 2018-01-16 @305 return __ttm_kmap_atomic_prot(page, prot);
403c1826a45644 Thomas Hellstrom 2018-01-16 306 }
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 307 EXPORT_SYMBOL(ttm_kmap_atomic_prot);
403c1826a45644 Thomas Hellstrom 2018-01-16 308
:::::: The code at line 305 was first introduced by commit
:::::: 403c1826a456441ee983acefbd03ce7d73d1ff00 drm/ttm: Clean up kmap_atomic_prot selection code
:::::: TO: Thomas Hellstrom <thellstrom at vmware.com>
:::::: CC: Thomas Hellstrom <thellstrom at vmware.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 66426 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20190925/9267aa0a/attachment-0001.gz>
More information about the dri-devel
mailing list