public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: David Hildenbrand <david@redhat.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [davidhildenbrand:rmap_batching 11/11] include/linux/pgtable.h:250:8: error: implicit declaration of function 'ptep_get_and_clear_full' is invalid in C99
Date: Sat, 20 Jan 2024 11:04:03 +0800	[thread overview]
Message-ID: <202401201129.CtaytKvQ-lkp@intel.com> (raw)

tree:   https://github.com/davidhildenbrand/linux rmap_batching
head:   c54f3b69b7a799efa06dbf58a60db9b3fac04111
commit: c54f3b69b7a799efa06dbf58a60db9b3fac04111 [11/11] mm/memory: optimize unmap/zap with PTE-mapped THP
config: arm64-randconfig-004-20240120 (https://download.01.org/0day-ci/archive/20240120/202401201129.CtaytKvQ-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project.git f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240120/202401201129.CtaytKvQ-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/202401201129.CtaytKvQ-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from arch/arm64/kernel/asm-offsets.c:12:
   In file included from include/linux/ftrace.h:10:
   In file included from include/linux/trace_recursion.h:5:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from arch/arm64/include/asm/hardirq.h:17:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/arm64/include/asm/io.h:12:
   include/linux/pgtable.h:218:38: error: use of undeclared identifier 'PFN_PTE_SHIFT'
           return __pte(pte_val(pte) + (1UL << PFN_PTE_SHIFT));
                                               ^
>> include/linux/pgtable.h:250:8: error: implicit declaration of function 'ptep_get_and_clear_full' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           pte = ptep_get_and_clear_full(mm, addr, ptep, full);
                 ^
   include/linux/pgtable.h:250:8: note: did you mean 'ptep_get_and_clear'?
   arch/arm64/include/asm/pgtable.h:951:21: note: 'ptep_get_and_clear' declared here
   static inline pte_t ptep_get_and_clear(struct mm_struct *mm,
                       ^
   In file included from arch/arm64/kernel/asm-offsets.c:12:
   In file included from include/linux/ftrace.h:10:
   In file included from include/linux/trace_recursion.h:5:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from arch/arm64/include/asm/hardirq.h:17:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/arm64/include/asm/io.h:12:
   include/linux/pgtable.h:250:6: error: assigning to 'pte_t' from incompatible type 'int'
           pte = ptep_get_and_clear_full(mm, addr, ptep, full);
               ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/pgtable.h:257:11: error: assigning to 'pte_t' from incompatible type 'int'
                   tmp_pte = ptep_get_and_clear_full(mm, addr, ptep, full);
                           ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/pgtable.h:277:3: error: implicit declaration of function 'ptep_get_and_clear_full' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                   ptep_get_and_clear_full(mm, addr, ptep, full);
                   ^
   include/linux/pgtable.h:617:21: error: static declaration of 'ptep_get_and_clear_full' follows non-static declaration
   static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm,
                       ^
   include/linux/pgtable.h:250:8: note: previous implicit declaration is here
           pte = ptep_get_and_clear_full(mm, addr, ptep, full);
                 ^
   6 errors generated.
   make[3]: *** [scripts/Makefile.build:116: arch/arm64/kernel/asm-offsets.s] Error 1 shuffle=2382276736
   make[3]: Target 'prepare' not remade because of errors.
   make[2]: *** [Makefile:1191: prepare0] Error 2 shuffle=2382276736
   make[2]: Target 'prepare' not remade because of errors.
   make[1]: *** [Makefile:234: __sub-make] Error 2 shuffle=2382276736
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:234: __sub-make] Error 2 shuffle=2382276736
   make: Target 'prepare' not remade because of errors.


vim +/ptep_get_and_clear_full +250 include/linux/pgtable.h

   235	
   236	#ifndef get_and_clear_full_ptes
   237	/*
   238	 * Will merge accessed/dirty bits from all PTEs and merge them into
   239	 * the first folio.
   240	 *
   241	 * Will not merge writable bits: the returned PTE might be R/O while some
   242	 * PTE might have been writable.
   243	 */
   244	static inline pte_t get_and_clear_full_ptes(struct mm_struct *mm,
   245			unsigned long addr, pte_t *ptep, unsigned int nr, int full)
   246	{
   247		pte_t tmp_pte;
   248		pte_t pte;
   249	
 > 250		pte = ptep_get_and_clear_full(mm, addr, ptep, full);
   251		if (--nr == 0)
   252			return pte;
   253		ptep++;
   254		addr += PAGE_SIZE;
   255	
   256		for (;;) {
   257			tmp_pte = ptep_get_and_clear_full(mm, addr, ptep, full);
   258			if (pte_dirty(tmp_pte))
   259				pte = pte_mkdirty(pte);
   260			if (pte_young(tmp_pte))
   261				pte = pte_mkyoung(pte);
   262			if (--nr == 0)
   263				break;
   264			ptep++;
   265			addr += PAGE_SIZE;
   266		}
   267	
   268		return pte;
   269	}
   270	#endif
   271	

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

                 reply	other threads:[~2024-01-20  3:04 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=202401201129.CtaytKvQ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=david@redhat.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox