Hi Christian, I love your patch! Perhaps something to improve: [auto build test WARNING on drm-tip/drm-tip] url: https://github.com/intel-lab-lkp/linux/commits/Christian-K-nig/drm-amdgpu-generally-allow-over-commit-during-BO-allocation/20221125-182408 base: git://anongit.freedesktop.org/drm/drm-tip drm-tip patch link: https://lore.kernel.org/r/20221125102137.1801-4-christian.koenig%40amd.com patch subject: [PATCH 4/9] drm/ttm: merge ttm_bo_api.h and ttm_bo_driver.h config: mips-allyesconfig compiler: mips-linux-gcc (GCC) 12.1.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/a21274229ca31424e4dbd33b32a8e064c7541c32 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Christian-K-nig/drm-amdgpu-generally-allow-over-commit-during-BO-allocation/20221125-182408 git checkout a21274229ca31424e4dbd33b32a8e064c7541c32 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/gpu/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/gpu/drm/ttm/ttm_bo_util.c: In function 'ttm_bo_kmap_ttm': drivers/gpu/drm/ttm/ttm_bo_util.c:364:32: error: implicit declaration of function 'vmap'; did you mean 'kmap'? [-Werror=implicit-function-declaration] 364 | map->virtual = vmap(ttm->pages + start_page, num_pages, | ^~~~ | kmap >> drivers/gpu/drm/ttm/ttm_bo_util.c:364:30: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 364 | map->virtual = vmap(ttm->pages + start_page, num_pages, | ^ drivers/gpu/drm/ttm/ttm_bo_util.c: In function 'ttm_bo_kunmap': drivers/gpu/drm/ttm/ttm_bo_util.c:429:17: error: implicit declaration of function 'vunmap'; did you mean 'kunmap'? [-Werror=implicit-function-declaration] 429 | vunmap(map->virtual); | ^~~~~~ | kunmap drivers/gpu/drm/ttm/ttm_bo_util.c: In function 'ttm_bo_vmap': drivers/gpu/drm/ttm/ttm_bo_util.c:509:23: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 509 | vaddr = vmap(ttm->pages, ttm->num_pages, 0, prot); | ^ cc1: some warnings being treated as errors vim +364 drivers/gpu/drm/ttm/ttm_bo_util.c ba4e7d973dd09b Thomas Hellstrom 2009-06-10 327 ba4e7d973dd09b Thomas Hellstrom 2009-06-10 328 static int ttm_bo_kmap_ttm(struct ttm_buffer_object *bo, ba4e7d973dd09b Thomas Hellstrom 2009-06-10 329 unsigned long start_page, ba4e7d973dd09b Thomas Hellstrom 2009-06-10 330 unsigned long num_pages, ba4e7d973dd09b Thomas Hellstrom 2009-06-10 331 struct ttm_bo_kmap_obj *map) ba4e7d973dd09b Thomas Hellstrom 2009-06-10 332 { d3116756a710e3 Christian König 2021-04-12 333 struct ttm_resource *mem = bo->resource; d0cef9fa4411eb Roger He 2017-12-21 334 struct ttm_operation_ctx ctx = { d0cef9fa4411eb Roger He 2017-12-21 335 .interruptible = false, d0cef9fa4411eb Roger He 2017-12-21 336 .no_wait_gpu = false d0cef9fa4411eb Roger He 2017-12-21 337 }; 62975d27d647a4 Christian König 2020-08-12 338 struct ttm_tt *ttm = bo->ttm; d0cef9fa4411eb Roger He 2017-12-21 339 pgprot_t prot; b1e5f172325547 Jerome Glisse 2011-11-02 340 int ret; ba4e7d973dd09b Thomas Hellstrom 2009-06-10 341 62975d27d647a4 Christian König 2020-08-12 342 BUG_ON(!ttm); b1e5f172325547 Jerome Glisse 2011-11-02 343 0a667b500703db Dave Airlie 2020-08-25 344 ret = ttm_tt_populate(bo->bdev, ttm, &ctx); b1e5f172325547 Jerome Glisse 2011-11-02 345 if (ret) b1e5f172325547 Jerome Glisse 2011-11-02 346 return ret; b1e5f172325547 Jerome Glisse 2011-11-02 347 ce65b874001d75 Christian König 2020-09-30 348 if (num_pages == 1 && ttm->caching == ttm_cached) { ba4e7d973dd09b Thomas Hellstrom 2009-06-10 349 /* ba4e7d973dd09b Thomas Hellstrom 2009-06-10 350 * We're mapping a single page, and the desired ba4e7d973dd09b Thomas Hellstrom 2009-06-10 351 * page protection is consistent with the bo. ba4e7d973dd09b Thomas Hellstrom 2009-06-10 352 */ ba4e7d973dd09b Thomas Hellstrom 2009-06-10 353 ba4e7d973dd09b Thomas Hellstrom 2009-06-10 354 map->bo_kmap_type = ttm_bo_map_kmap; b1e5f172325547 Jerome Glisse 2011-11-02 355 map->page = ttm->pages[start_page]; ba4e7d973dd09b Thomas Hellstrom 2009-06-10 356 map->virtual = kmap(map->page); ba4e7d973dd09b Thomas Hellstrom 2009-06-10 357 } else { ba4e7d973dd09b Thomas Hellstrom 2009-06-10 358 /* ba4e7d973dd09b Thomas Hellstrom 2009-06-10 359 * We need to use vmap to get the desired page protection af901ca181d92a André Goddard Rosa 2009-11-14 360 * or to make the buffer object look contiguous. ba4e7d973dd09b Thomas Hellstrom 2009-06-10 361 */ 867bcecd6ae463 Christian König 2020-09-30 362 prot = ttm_io_prot(bo, mem, PAGE_KERNEL); ba4e7d973dd09b Thomas Hellstrom 2009-06-10 363 map->bo_kmap_type = ttm_bo_map_vmap; ba4e7d973dd09b Thomas Hellstrom 2009-06-10 @364 map->virtual = vmap(ttm->pages + start_page, num_pages, ba4e7d973dd09b Thomas Hellstrom 2009-06-10 365 0, prot); ba4e7d973dd09b Thomas Hellstrom 2009-06-10 366 } ba4e7d973dd09b Thomas Hellstrom 2009-06-10 367 return (!map->virtual) ? -ENOMEM : 0; ba4e7d973dd09b Thomas Hellstrom 2009-06-10 368 } ba4e7d973dd09b Thomas Hellstrom 2009-06-10 369 -- 0-DAY CI Kernel Test Service https://01.org/lkp