All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: oe-kbuild-all@lists.linux.dev, Mike Rapoport <rppt@kernel.org>
Subject: [rppt:execmem/x86-rox/v8 3/6] arch/x86/mm/pat/set_memory.c:1314:17: error: implicit declaration of function 'collapse_page_count'; did you mean 'update_page_count'?
Date: Sun, 22 Dec 2024 22:25:38 +0800	[thread overview]
Message-ID: <202412222227.GhIMiwUp-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git execmem/x86-rox/v8
head:   6c4eb6e17cdd71fe4df151523bb69db507c52b8c
commit: 84b77b5e5004c02f0f731ca69c66a8d8f4bcbc6c [3/6] x86/mm/pat: Restore large pages after fragmentation
config: x86_64-buildonly-randconfig-004-20241222 (https://download.01.org/0day-ci/archive/20241222/202412222227.GhIMiwUp-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241222/202412222227.GhIMiwUp-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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412222227.GhIMiwUp-lkp@intel.com/

All errors (new ones prefixed by >>):

   arch/x86/mm/pat/set_memory.c: In function 'collapse_pmd_page':
>> arch/x86/mm/pat/set_memory.c:1314:17: error: implicit declaration of function 'collapse_page_count'; did you mean 'update_page_count'? [-Werror=implicit-function-declaration]
    1314 |                 collapse_page_count(PG_LEVEL_2M);
         |                 ^~~~~~~~~~~~~~~~~~~
         |                 update_page_count
   cc1: some warnings being treated as errors


vim +1314 arch/x86/mm/pat/set_memory.c

  1251	
  1252	static int collapse_pmd_page(pmd_t *pmd, unsigned long addr,
  1253				     struct list_head *pgtables)
  1254	{
  1255		pmd_t _pmd, old_pmd;
  1256		pte_t *pte, first;
  1257		unsigned long pfn;
  1258		pgprot_t pgprot;
  1259		int i = 0;
  1260	
  1261		addr &= PMD_MASK;
  1262		pte = pte_offset_kernel(pmd, addr);
  1263		first = *pte;
  1264		pfn = pte_pfn(first);
  1265	
  1266		/* Make sure alignment is suitable */
  1267		if (PFN_PHYS(pfn) & ~PMD_MASK)
  1268			return 0;
  1269	
  1270		/* The page is 4k intentionally */
  1271		if (pte_flags(first) & _PAGE_KERNEL_4K)
  1272			return 0;
  1273	
  1274		/* Check that the rest of PTEs are compatible with the first one */
  1275		for (i = 1, pte++; i < PTRS_PER_PTE; i++, pte++) {
  1276			pte_t entry = *pte;
  1277	
  1278			if (!pte_present(entry))
  1279				return 0;
  1280			if (pte_flags(entry) != pte_flags(first))
  1281				return 0;
  1282			if (pte_pfn(entry) != pte_pfn(first) + i)
  1283				return 0;
  1284		}
  1285	
  1286		old_pmd = *pmd;
  1287	
  1288		/* Success: set up a large page */
  1289		pgprot = pgprot_4k_2_large(pte_pgprot(first));
  1290		pgprot_val(pgprot) |= _PAGE_PSE;
  1291		_pmd = pfn_pmd(pfn, pgprot);
  1292		set_pmd(pmd, _pmd);
  1293	
  1294		/* Queue the page table to be freed after TLB flush */
  1295		list_add(&page_ptdesc(pmd_page(old_pmd))->pt_list, pgtables);
  1296	
  1297		if (IS_ENABLED(CONFIG_X86_32) && !SHARED_KERNEL_PMD) {
  1298			struct page *page;
  1299	
  1300			/* Update all PGD tables to use the same large page */
  1301			list_for_each_entry(page, &pgd_list, lru) {
  1302				pgd_t *pgd = (pgd_t *)page_address(page) + pgd_index(addr);
  1303				p4d_t *p4d = p4d_offset(pgd, addr);
  1304				pud_t *pud = pud_offset(p4d, addr);
  1305				pmd_t *pmd = pmd_offset(pud, addr);
  1306				/* Something is wrong if entries doesn't match */
  1307				if (WARN_ON(pmd_val(old_pmd) != pmd_val(*pmd)))
  1308					continue;
  1309				set_pmd(pmd, _pmd);
  1310			}
  1311		}
  1312	
  1313		if (pfn_range_is_mapped(pfn, pfn + 1))
> 1314			collapse_page_count(PG_LEVEL_2M);
  1315	
  1316		return 1;
  1317	}
  1318	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2024-12-22 14:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202412222227.GhIMiwUp-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rppt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.