tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: e6455bc5b91f41f842f30465c9193320f0568707 commit: cbba4e22584984bffccd07e0801fd2b8ec1ecf5f [6277/6751] Move /proc/kpageidle to /sys/kernel/mm/page_idle/bitmap config: sh-allmodconfig (attached as .config) reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout cbba4e22584984bffccd07e0801fd2b8ec1ecf5f # save the attached .config to linux build tree make.cross ARCH=sh All error/warnings (new ones prefixed by >>): mm/page_idle.c: In function 'page_idle_clear_pte_refs_one': >> mm/page_idle.c:67:4: error: implicit declaration of function 'pmdp_test_and_clear_young' [-Werror=implicit-function-declaration] >> mm/page_idle.c:71:3: error: implicit declaration of function 'page_check_address' [-Werror=implicit-function-declaration] >> mm/page_idle.c:71:7: warning: assignment makes pointer from integer without a cast [enabled by default] >> mm/page_idle.c:73:4: error: implicit declaration of function 'ptep_test_and_clear_young' [-Werror=implicit-function-declaration] mm/page_idle.c: In function 'page_idle_clear_pte_refs': >> mm/page_idle.c:95:22: error: variable 'rwc' has initializer but incomplete type >> mm/page_idle.c:96:3: error: unknown field 'rmap_one' specified in initializer >> mm/page_idle.c:96:3: warning: excess elements in struct initializer [enabled by default] >> mm/page_idle.c:96:3: warning: (near initialization for 'rwc') [enabled by default] >> mm/page_idle.c:97:3: error: unknown field 'anon_lock' specified in initializer >> mm/page_idle.c:97:16: error: 'page_lock_anon_vma_read' undeclared (first use in this function) mm/page_idle.c:97:16: note: each undeclared identifier is reported only once for each function it appears in mm/page_idle.c:97:3: warning: excess elements in struct initializer [enabled by default] mm/page_idle.c:97:3: warning: (near initialization for 'rwc') [enabled by default] >> mm/page_idle.c:95:40: error: storage size of 'rwc' isn't known >> mm/page_idle.c:109:2: error: implicit declaration of function 'rmap_walk' [-Werror=implicit-function-declaration] >> mm/page_idle.c:95:40: warning: unused variable 'rwc' [-Wunused-variable] cc1: some warnings being treated as errors vim +/pmdp_test_and_clear_young +67 mm/page_idle.c 61 bool referenced = false; 62 63 if (unlikely(PageTransHuge(page))) { 64 pmd = page_check_address_pmd(page, mm, addr, 65 PAGE_CHECK_ADDRESS_PMD_FLAG, &ptl); 66 if (pmd) { > 67 referenced = pmdp_clear_young_notify(vma, addr, pmd); 68 spin_unlock(ptl); 69 } 70 } else { > 71 pte = page_check_address(page, mm, addr, &ptl, 0); 72 if (pte) { > 73 referenced = ptep_clear_young_notify(vma, addr, pte); 74 pte_unmap_unlock(pte, ptl); 75 } 76 } 77 if (referenced) { 78 clear_page_idle(page); 79 /* 80 * We cleared the referenced bit in a mapping to this page. To 81 * avoid interference with page reclaim, mark it young so that 82 * page_referenced() will return > 0. 83 */ 84 set_page_young(page); 85 } 86 return SWAP_AGAIN; 87 } 88 89 static void page_idle_clear_pte_refs(struct page *page) 90 { 91 /* 92 * Since rwc.arg is unused, rwc is effectively immutable, so we 93 * can make it static const to save some cycles and stack. 94 */ > 95 static const struct rmap_walk_control rwc = { > 96 .rmap_one = page_idle_clear_pte_refs_one, > 97 .anon_lock = page_lock_anon_vma_read, 98 }; 99 bool need_lock; 100 101 if (!page_mapped(page) || 102 !page_rmapping(page)) 103 return; 104 105 need_lock = !PageAnon(page) || PageKsm(page); 106 if (need_lock && !trylock_page(page)) 107 return; 108 > 109 rmap_walk(page, (struct rmap_walk_control *)&rwc); 110 111 if (need_lock) 112 unlock_page(page); --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation