Hi Roger, I love your patch! Yet something to improve: [auto build test ERROR on drm/drm-next] [also build test ERROR on v4.16-rc2 next-20180223] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Roger-He/drm-ttm-check-if-free-mem-space-is-under-the-lower-limit/20180225-033957 base: git://people.freedesktop.org/~airlied/linux.git drm-next config: x86_64-rhel (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): drivers/gpu//drm/ttm/ttm_memory.c: In function 'ttm_check_under_lowerlimit': >> drivers/gpu//drm/ttm/ttm_memory.c:552:9: error: 'struct ttm_operation_ctx' has no member named 'flags' if (ctx->flags & TTM_OPT_FLAG_FORCE_ALLOC) ^~ >> drivers/gpu//drm/ttm/ttm_memory.c:552:19: error: 'TTM_OPT_FLAG_FORCE_ALLOC' undeclared (first use in this function); did you mean 'TTM_PAGE_FLAG_ZERO_ALLOC'? if (ctx->flags & TTM_OPT_FLAG_FORCE_ALLOC) ^~~~~~~~~~~~~~~~~~~~~~~~ TTM_PAGE_FLAG_ZERO_ALLOC drivers/gpu//drm/ttm/ttm_memory.c:552:19: note: each undeclared identifier is reported only once for each function it appears in vim +552 drivers/gpu//drm/ttm/ttm_memory.c 534 535 /* 536 * check if the available mem is under lower memory limit 537 * 538 * a. if no swap disk at all or free swap space is under swap_mem_limit 539 * but available system mem is bigger than sys_mem_limit, allow TTM 540 * allocation; 541 * 542 * b. if the available system mem is less than sys_mem_limit but free 543 * swap disk is bigger than swap_mem_limit, allow TTM allocation. 544 */ 545 bool 546 ttm_check_under_lowerlimit(struct ttm_mem_global *glob, 547 uint64_t num_pages, 548 struct ttm_operation_ctx *ctx) 549 { 550 int64_t available; 551 > 552 if (ctx->flags & TTM_OPT_FLAG_FORCE_ALLOC) 553 return false; 554 555 available = get_nr_swap_pages() + si_mem_available(); 556 available -= num_pages; 557 if (available < glob->lower_mem_limit) 558 return true; 559 560 return false; 561 } 562 EXPORT_SYMBOL(ttm_check_under_lowerlimit); 563 --- 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