From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 188E4C47DD9 for ; Wed, 28 Feb 2024 14:49:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 697596B009B; Wed, 28 Feb 2024 09:49:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 646786B009C; Wed, 28 Feb 2024 09:49:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 50EDC6B009E; Wed, 28 Feb 2024 09:49:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 4085F6B009B for ; Wed, 28 Feb 2024 09:49:15 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 17F05160FAF for ; Wed, 28 Feb 2024 14:49:15 +0000 (UTC) X-FDA: 81841495470.03.0B3F5BF Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) by imf08.hostedemail.com (Postfix) with ESMTP id 35CF5160017 for ; Wed, 28 Feb 2024 14:49:11 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=MsTkAfry; spf=pass (imf08.hostedemail.com: domain of lkp@intel.com designates 192.198.163.16 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1709131753; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=1cGZrqhJ2UGYFbCdhW7O8YxGkdHPWYyBBL6a5lTPWm4=; b=KQNuRjSfzDK1UpHwmhng2lV/WjhmMe9ufcUZcQO0FKWpNF9oMYDgeqMRVcHeYqzJvNZsh9 gdytU6jm7YrMrmv4UfsxUzB38iTclcUILZXxZLaduwS8gbuoCPpAvzZkmj8bHRa4Vkb/gB AnO2BPLLE1CC5rrgwpCr7ZMmrRxuQ9A= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709131753; a=rsa-sha256; cv=none; b=h9FITx8V/l7DqignAl8YLj/XkNNQaq5fV+Ft4PWLrCmn6lmphkvfmyoYfuvCluJ54hVRgJ y0skwDUkXOL6BZfIK6oLTnqwcwhDe+6Bllil2PNVVANGP4TmixIv+URs7+kMT0H2MI4apV X7exm9J0UZEWu7Yrz49AXYFzTkL5HD8= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=MsTkAfry; spf=pass (imf08.hostedemail.com: domain of lkp@intel.com designates 192.198.163.16 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709131752; x=1740667752; h=date:from:to:cc:subject:message-id:mime-version; bh=eJyQQqk6fEpgtMTI5rkBgsH7hAi0wMMZ2qh3JBBlQ4Q=; b=MsTkAfrymAZY2PokvD1cn33NmVVF9IhxvNmPbXvRZOEoeGNi+aaPZmrW qY6mn5QmT+A20Teosr5VCT1Dvvri+P8vj/wmFBkCUBkzoZfRlKjcThlyo Rg/yFBmv38ih/bVYc9TSdA/OdlzXIM28wZqmTCskijAsG0thIEE5uRVhi rYKNd6mynBCQN7jtpBeCzO73s7GDMRIbZkwcWdVnDwIFVFei0kTlBybKG hibaRNkXhAgUZnqHT/BEHSSlkgAv1r+15VpeW/5fRCLfSk+ahAOnVCSiD 3eW3E5wONDstDLj19F8mRP7j2UKwEctMZLasJvo/3pgJ7uAZ7H0ui5Ix6 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10998"; a="4104700" X-IronPort-AV: E=Sophos;i="6.06,190,1705392000"; d="scan'208";a="4104700" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2024 06:49:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,190,1705392000"; d="scan'208";a="7406422" Received: from lkp-server02.sh.intel.com (HELO 3c78fa4d504c) ([10.239.97.151]) by fmviesa010.fm.intel.com with ESMTP; 28 Feb 2024 06:49:09 -0800 Received: from kbuild by 3c78fa4d504c with local (Exim 4.96) (envelope-from ) id 1rfLF4-000C8t-0l; Wed, 28 Feb 2024 14:49:06 +0000 Date: Wed, 28 Feb 2024 22:48:11 +0800 From: kernel test robot To: Barry Song Cc: oe-kbuild-all@lists.linux.dev, Linux Memory Management List , Andrew Morton , David Hildenbrand , Ryan Roberts Subject: [linux-next:master 10511/10830] mm/internal.h:98:23: error: implicit declaration of function 'pte_mkclean'; did you mean 'page_mkclean'? Message-ID: <202402282202.yV6GmMJu-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspamd-Queue-Id: 35CF5160017 X-Rspam-User: X-Stat-Signature: cprohd8wd3oh5uz1grbgcsfpqwmuhu4h X-Rspamd-Server: rspam03 X-HE-Tag: 1709131751-125495 X-HE-Meta: U2FsdGVkX1+EnCRCNsT0MPi0Bu0tLuGb9zs2FlbQBM1ag5X8bBB50lOFdA91pAG4IuWyzoL1ikE9IF4ReMbGi0Guuaq7toOZlZSvWs0QJgtm+PIoiRdborWBeukaQfG7Xp/GGeH34UGHRue0UQYx74pKVhJ7L1Cxnb4Ngm+zrT4MAxsT2UrLxpP4/O3IZkEtdHQolFHgKk5Ma379HgM13ghHdZdh/6Bq/N8ykQKPSjEnJSxDFo85b9xowA0Ef86skbED8siTbXziCCDPAGpQZSS+oycFv45fSmrKHVp/CYfoxlIaeJzNu3pKif8deUSMKd8mx5AE4BmHLW0PNDb0v7bbmwyEc6jVBbOwbGMCH8oSiz+rY2p0QokDUDL7fsQzi/t1+ZaAeVnmvDN5PTJehBmo5LebPAo3I8zPbnlsgp+D7hvIkiJFRhnSL3A3uOB2uRXNLh5t/OVlO7Mstqy53RE4Jzvc5QOTGAWV4LBbJTfRuuXFuulYHc9aq8CPzP56k/0iJtbk/hVSwd2aR41SFSlMYTAo4cSdLODw+P1pZoR1CRHwCSqt5LCE5n/3zwTghSwe0wl2lORhFJWknhGicLASq1Xyvv7JXCMKN7Y3ix29cBveBeUwC06+YAC+LmmtXB3MDTtZqFtV1BGYhjjw6Qrx36u/YGwXOI3k4KamAZ9bf2F+pZKnuBER068AUaktc3oy6DBmDAe2jo+qke4OvVU5TFWoI8UrHjs1g2kzeRr1VLOwEPd0NqXK1kZpAUhVlt4LM2L7L0xtmgt74aZLPxwdZSsEfs1saqnPd0fBe2PWc8R6v6TM5AORZMV8k7BIo3tJ+9c/63LIvyb+vaC5JZ/frlbj4NlqR625BRSAO9zFNEAZpg+G5zCu1elmW2gMGMOSPKAzXHSyu3xIxvAtEmbXI1MzlWGry8Ct58m5FLvcr1pybEjztA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 20af1ca418d2c0b11bc2a1fe8c0c88f67bcc2a7e commit: 9ea89c8b43ac0de34c9542a97eaab901af02e5a8 [10511/10830] mm: make folio_pte_batch available outside of mm/memory.c config: riscv-nommu_k210_defconfig (https://download.01.org/0day-ci/archive/20240228/202402282202.yV6GmMJu-lkp@intel.com/config) compiler: riscv64-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240228/202402282202.yV6GmMJu-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202402282202.yV6GmMJu-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from mm/filemap.c:51: mm/internal.h: In function '__pte_batch_clear_ignored': >> mm/internal.h:98:23: error: implicit declaration of function 'pte_mkclean'; did you mean 'page_mkclean'? [-Werror=implicit-function-declaration] 98 | pte = pte_mkclean(pte); | ^~~~~~~~~~~ | page_mkclean mm/internal.h:98:23: error: incompatible types when assigning to type 'pte_t' from type 'int' >> mm/internal.h:101:16: error: implicit declaration of function 'pte_wrprotect' [-Werror=implicit-function-declaration] 101 | return pte_wrprotect(pte_mkold(pte)); | ^~~~~~~~~~~~~ >> mm/internal.h:101:30: error: implicit declaration of function 'pte_mkold' [-Werror=implicit-function-declaration] 101 | return pte_wrprotect(pte_mkold(pte)); | ^~~~~~~~~ >> mm/internal.h:101:16: error: incompatible types when returning type 'int' but 'pte_t' was expected 101 | return pte_wrprotect(pte_mkold(pte)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from include/linux/container_of.h:5, from include/linux/list.h:5, from include/linux/wait.h:7, from include/linux/wait_bit.h:8, from include/linux/fs.h:6, from include/linux/dax.h:5, from mm/filemap.c:15: mm/internal.h: In function 'folio_pte_batch': >> mm/internal.h:140:27: error: implicit declaration of function 'pte_present'; did you mean 'pgd_present'? [-Werror=implicit-function-declaration] 140 | VM_WARN_ON_FOLIO(!pte_present(pte), folio); | ^~~~~~~~~~~ include/linux/build_bug.h:30:63: note: in definition of macro 'BUILD_BUG_ON_INVALID' 30 | #define BUILD_BUG_ON_INVALID(e) ((void)(sizeof((__force long)(e)))) | ^ mm/internal.h:140:9: note: in expansion of macro 'VM_WARN_ON_FOLIO' 140 | VM_WARN_ON_FOLIO(!pte_present(pte), folio); | ^~~~~~~~~~~~~~~~ >> mm/internal.h:142:49: error: implicit declaration of function 'pte_pfn' [-Werror=implicit-function-declaration] 142 | VM_WARN_ON_FOLIO(page_folio(pfn_to_page(pte_pfn(pte))) != folio, folio); | ^~~~~~~ include/linux/build_bug.h:30:63: note: in definition of macro 'BUILD_BUG_ON_INVALID' 30 | #define BUILD_BUG_ON_INVALID(e) ((void)(sizeof((__force long)(e)))) | ^ mm/internal.h:142:9: note: in expansion of macro 'VM_WARN_ON_FOLIO' 142 | VM_WARN_ON_FOLIO(page_folio(pfn_to_page(pte_pfn(pte))) != folio, folio); | ^~~~~~~~~~~~~~~~ mm/internal.h:142:26: note: in expansion of macro 'page_folio' 142 | VM_WARN_ON_FOLIO(page_folio(pfn_to_page(pte_pfn(pte))) != folio, folio); | ^~~~~~~~~~ include/asm-generic/memory_model.h:65:21: note: in expansion of macro '__pfn_to_page' 65 | #define pfn_to_page __pfn_to_page | ^~~~~~~~~~~~~ mm/internal.h:142:37: note: in expansion of macro 'pfn_to_page' 142 | VM_WARN_ON_FOLIO(page_folio(pfn_to_page(pte_pfn(pte))) != folio, folio); | ^~~~~~~~~~~ mm/internal.h:144:14: error: implicit declaration of function 'pte_batch_hint' [-Werror=implicit-function-declaration] 144 | nr = pte_batch_hint(start_ptep, pte); | ^~~~~~~~~~~~~~ mm/internal.h:145:50: error: implicit declaration of function 'pte_advance_pfn' [-Werror=implicit-function-declaration] 145 | expected_pte = __pte_batch_clear_ignored(pte_advance_pfn(pte, nr), flags); | ^~~~~~~~~~~~~~~ mm/internal.h:145:50: error: incompatible type for argument 1 of '__pte_batch_clear_ignored' 145 | expected_pte = __pte_batch_clear_ignored(pte_advance_pfn(pte, nr), flags); | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | int mm/internal.h:95:53: note: expected 'pte_t' but argument is of type 'int' 95 | static inline pte_t __pte_batch_clear_ignored(pte_t pte, fpb_t flags) | ~~~~~~^~~ mm/internal.h:149:23: error: implicit declaration of function 'ptep_get' [-Werror=implicit-function-declaration] 149 | pte = ptep_get(ptep); | ^~~~~~~~ mm/internal.h:149:23: error: incompatible types when assigning to type 'pte_t' from type 'int' >> mm/internal.h:151:38: error: implicit declaration of function 'pte_write'; did you mean 'pgd_write'? [-Werror=implicit-function-declaration] 151 | writable = !!pte_write(pte); | ^~~~~~~~~ | pgd_write mm/internal.h:154:22: error: implicit declaration of function 'pte_same' [-Werror=implicit-function-declaration] 154 | if (!pte_same(pte, expected_pte)) | ^~~~~~~~ mm/internal.h:169:32: error: incompatible types when assigning to type 'pte_t' from type 'int' 169 | expected_pte = pte_advance_pfn(expected_pte, nr); | ^~~~~~~~~~~~~~~ cc1: some warnings being treated as errors -- In file included from mm/oom_kill.c:50: mm/internal.h: In function '__pte_batch_clear_ignored': >> mm/internal.h:98:23: error: implicit declaration of function 'pte_mkclean'; did you mean 'page_mkclean'? [-Werror=implicit-function-declaration] 98 | pte = pte_mkclean(pte); | ^~~~~~~~~~~ | page_mkclean mm/internal.h:98:23: error: incompatible types when assigning to type 'pte_t' from type 'int' >> mm/internal.h:101:16: error: implicit declaration of function 'pte_wrprotect' [-Werror=implicit-function-declaration] 101 | return pte_wrprotect(pte_mkold(pte)); | ^~~~~~~~~~~~~ >> mm/internal.h:101:30: error: implicit declaration of function 'pte_mkold' [-Werror=implicit-function-declaration] 101 | return pte_wrprotect(pte_mkold(pte)); | ^~~~~~~~~ >> mm/internal.h:101:16: error: incompatible types when returning type 'int' but 'pte_t' was expected 101 | return pte_wrprotect(pte_mkold(pte)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from include/linux/container_of.h:5, from include/linux/list.h:5, from include/linux/rculist.h:10, from include/linux/sched/signal.h:5, from include/linux/oom.h:6, from mm/oom_kill.c:21: mm/internal.h: In function 'folio_pte_batch': >> mm/internal.h:140:27: error: implicit declaration of function 'pte_present'; did you mean 'pgd_present'? [-Werror=implicit-function-declaration] 140 | VM_WARN_ON_FOLIO(!pte_present(pte), folio); | ^~~~~~~~~~~ include/linux/build_bug.h:30:63: note: in definition of macro 'BUILD_BUG_ON_INVALID' 30 | #define BUILD_BUG_ON_INVALID(e) ((void)(sizeof((__force long)(e)))) | ^ mm/internal.h:140:9: note: in expansion of macro 'VM_WARN_ON_FOLIO' 140 | VM_WARN_ON_FOLIO(!pte_present(pte), folio); | ^~~~~~~~~~~~~~~~ >> mm/internal.h:142:49: error: implicit declaration of function 'pte_pfn' [-Werror=implicit-function-declaration] 142 | VM_WARN_ON_FOLIO(page_folio(pfn_to_page(pte_pfn(pte))) != folio, folio); | ^~~~~~~ include/linux/build_bug.h:30:63: note: in definition of macro 'BUILD_BUG_ON_INVALID' 30 | #define BUILD_BUG_ON_INVALID(e) ((void)(sizeof((__force long)(e)))) | ^ mm/internal.h:142:9: note: in expansion of macro 'VM_WARN_ON_FOLIO' 142 | VM_WARN_ON_FOLIO(page_folio(pfn_to_page(pte_pfn(pte))) != folio, folio); | ^~~~~~~~~~~~~~~~ mm/internal.h:142:26: note: in expansion of macro 'page_folio' 142 | VM_WARN_ON_FOLIO(page_folio(pfn_to_page(pte_pfn(pte))) != folio, folio); | ^~~~~~~~~~ include/asm-generic/memory_model.h:65:21: note: in expansion of macro '__pfn_to_page' 65 | #define pfn_to_page __pfn_to_page | ^~~~~~~~~~~~~ mm/internal.h:142:37: note: in expansion of macro 'pfn_to_page' 142 | VM_WARN_ON_FOLIO(page_folio(pfn_to_page(pte_pfn(pte))) != folio, folio); | ^~~~~~~~~~~ mm/internal.h:144:14: error: implicit declaration of function 'pte_batch_hint' [-Werror=implicit-function-declaration] 144 | nr = pte_batch_hint(start_ptep, pte); | ^~~~~~~~~~~~~~ mm/internal.h:145:50: error: implicit declaration of function 'pte_advance_pfn' [-Werror=implicit-function-declaration] 145 | expected_pte = __pte_batch_clear_ignored(pte_advance_pfn(pte, nr), flags); | ^~~~~~~~~~~~~~~ mm/internal.h:145:50: error: incompatible type for argument 1 of '__pte_batch_clear_ignored' 145 | expected_pte = __pte_batch_clear_ignored(pte_advance_pfn(pte, nr), flags); | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | int mm/internal.h:95:53: note: expected 'pte_t' but argument is of type 'int' 95 | static inline pte_t __pte_batch_clear_ignored(pte_t pte, fpb_t flags) | ~~~~~~^~~ mm/internal.h:149:23: error: implicit declaration of function 'ptep_get' [-Werror=implicit-function-declaration] 149 | pte = ptep_get(ptep); | ^~~~~~~~ mm/internal.h:149:23: error: incompatible types when assigning to type 'pte_t' from type 'int' mm/internal.h:151:38: error: implicit declaration of function 'pte_write'; did you mean 'seq_write'? [-Werror=implicit-function-declaration] 151 | writable = !!pte_write(pte); | ^~~~~~~~~ | seq_write mm/internal.h:154:22: error: implicit declaration of function 'pte_same' [-Werror=implicit-function-declaration] 154 | if (!pte_same(pte, expected_pte)) | ^~~~~~~~ mm/internal.h:169:32: error: incompatible types when assigning to type 'pte_t' from type 'int' 169 | expected_pte = pte_advance_pfn(expected_pte, nr); | ^~~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +98 mm/internal.h 94 95 static inline pte_t __pte_batch_clear_ignored(pte_t pte, fpb_t flags) 96 { 97 if (flags & FPB_IGNORE_DIRTY) > 98 pte = pte_mkclean(pte); 99 if (likely(flags & FPB_IGNORE_SOFT_DIRTY)) 100 pte = pte_clear_soft_dirty(pte); > 101 return pte_wrprotect(pte_mkold(pte)); 102 } 103 104 /** 105 * folio_pte_batch - detect a PTE batch for a large folio 106 * @folio: The large folio to detect a PTE batch for. 107 * @addr: The user virtual address the first page is mapped at. 108 * @start_ptep: Page table pointer for the first entry. 109 * @pte: Page table entry for the first page. 110 * @max_nr: The maximum number of table entries to consider. 111 * @flags: Flags to modify the PTE batch semantics. 112 * @any_writable: Optional pointer to indicate whether any entry except the 113 * first one is writable. 114 * 115 * Detect a PTE batch: consecutive (present) PTEs that map consecutive 116 * pages of the same large folio. 117 * 118 * All PTEs inside a PTE batch have the same PTE bits set, excluding the PFN, 119 * the accessed bit, writable bit, dirty bit (with FPB_IGNORE_DIRTY) and 120 * soft-dirty bit (with FPB_IGNORE_SOFT_DIRTY). 121 * 122 * start_ptep must map any page of the folio. max_nr must be at least one and 123 * must be limited by the caller so scanning cannot exceed a single page table. 124 * 125 * Return: the number of table entries in the batch. 126 */ 127 static inline int folio_pte_batch(struct folio *folio, unsigned long addr, 128 pte_t *start_ptep, pte_t pte, int max_nr, fpb_t flags, 129 bool *any_writable) 130 { 131 unsigned long folio_end_pfn = folio_pfn(folio) + folio_nr_pages(folio); 132 const pte_t *end_ptep = start_ptep + max_nr; 133 pte_t expected_pte, *ptep; 134 bool writable; 135 int nr; 136 137 if (any_writable) 138 *any_writable = false; 139 > 140 VM_WARN_ON_FOLIO(!pte_present(pte), folio); 141 VM_WARN_ON_FOLIO(!folio_test_large(folio) || max_nr < 1, folio); > 142 VM_WARN_ON_FOLIO(page_folio(pfn_to_page(pte_pfn(pte))) != folio, folio); 143 144 nr = pte_batch_hint(start_ptep, pte); 145 expected_pte = __pte_batch_clear_ignored(pte_advance_pfn(pte, nr), flags); 146 ptep = start_ptep + nr; 147 148 while (ptep < end_ptep) { 149 pte = ptep_get(ptep); 150 if (any_writable) > 151 writable = !!pte_write(pte); 152 pte = __pte_batch_clear_ignored(pte, flags); 153 154 if (!pte_same(pte, expected_pte)) 155 break; 156 157 /* 158 * Stop immediately once we reached the end of the folio. In 159 * corner cases the next PFN might fall into a different 160 * folio. 161 */ 162 if (pte_pfn(pte) >= folio_end_pfn) 163 break; 164 165 if (any_writable) 166 *any_writable |= writable; 167 168 nr = pte_batch_hint(ptep, pte); 169 expected_pte = pte_advance_pfn(expected_pte, nr); 170 ptep += nr; 171 } 172 173 return min(ptep - start_ptep, max_nr); 174 } 175 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki