Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Xie Yuanbin <qq570070308@gmail.com>,
	david@redhat.com, tglx@linutronix.de, segher@kernel.crashing.org,
	riel@surriel.com, peterz@infradead.org, linux@armlinux.org.uk,
	mathieu.desnoyers@efficios.com, paulmck@kernel.org,
	pjw@kernel.org, palmer@dabbelt.com, aou@eecs.berkeley.edu,
	alex@ghiti.fr, hca@linux.ibm.com, gor@linux.ibm.com,
	agordeev@linux.ibm.com, borntraeger@linux.ibm.com,
	svens@linux.ibm.com, davem@davemloft.net, andreas@gaisler.com,
	luto@kernel.org, mingo@redhat.com, bp@alien8.de,
	dave.hansen@linux.intel.com, hpa@zytor.com, acme@kernel.org,
	namhyung@kernel.org, mark.rutland@arm.com,
	alexander.shishkin@linux.intel.com, jolsa@kernel.org,
	irogers@google.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH v2 1/4] Make enter_lazy_tlb inline on x86
Date: Sun, 9 Nov 2025 22:42:54 +0800	[thread overview]
Message-ID: <202511092219.73aMMES4-lkp@intel.com> (raw)
In-Reply-To: <20251108172346.263590-2-qq570070308@gmail.com>

Hi Xie,

kernel test robot noticed the following build errors:

[auto build test ERROR on tip/sched/core]
[also build test ERROR on tip/x86/core tip/x86/mm s390/features perf-tools-next/perf-tools-next tip/perf/core perf-tools/perf-tools linus/master v6.18-rc4 next-20251107]
[cannot apply to acme/perf/core tip/timers/nohz]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Xie-Yuanbin/Make-enter_lazy_tlb-inline-on-x86/20251109-013003
base:   tip/sched/core
patch link:    https://lore.kernel.org/r/20251108172346.263590-2-qq570070308%40gmail.com
patch subject: [PATCH v2 1/4] Make enter_lazy_tlb inline on x86
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20251109/202511092219.73aMMES4-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251109/202511092219.73aMMES4-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/202511092219.73aMMES4-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from arch/x86/kvm/../../../virt/kvm/async_pf.c:14:
   In file included from include/linux/mmu_context.h:5:
>> arch/x86/include/asm/mmu_context.h:155:20: error: use of undeclared identifier 'cpu_tlbstate'
     155 |         if (this_cpu_read(cpu_tlbstate.loaded_mm) == &init_mm)
         |                           ^
>> arch/x86/include/asm/mmu_context.h:155:20: error: use of undeclared identifier 'cpu_tlbstate'
>> arch/x86/include/asm/mmu_context.h:155:20: error: use of undeclared identifier 'cpu_tlbstate'
>> arch/x86/include/asm/mmu_context.h:155:20: error: use of undeclared identifier 'cpu_tlbstate'
>> arch/x86/include/asm/mmu_context.h:155:20: error: use of undeclared identifier 'cpu_tlbstate'
>> arch/x86/include/asm/mmu_context.h:155:20: error: use of undeclared identifier 'cpu_tlbstate'
>> arch/x86/include/asm/mmu_context.h:155:20: error: use of undeclared identifier 'cpu_tlbstate'
>> arch/x86/include/asm/mmu_context.h:155:20: error: use of undeclared identifier 'cpu_tlbstate'
>> arch/x86/include/asm/mmu_context.h:155:20: error: use of undeclared identifier 'cpu_tlbstate'
>> arch/x86/include/asm/mmu_context.h:155:20: error: use of undeclared identifier 'cpu_tlbstate'
>> arch/x86/include/asm/mmu_context.h:155:20: error: use of undeclared identifier 'cpu_tlbstate'
>> arch/x86/include/asm/mmu_context.h:158:17: error: use of undeclared identifier 'cpu_tlbstate_shared'
     158 |         this_cpu_write(cpu_tlbstate_shared.is_lazy, true);
         |                        ^
>> arch/x86/include/asm/mmu_context.h:158:17: error: use of undeclared identifier 'cpu_tlbstate_shared'
>> arch/x86/include/asm/mmu_context.h:158:17: error: use of undeclared identifier 'cpu_tlbstate_shared'
>> arch/x86/include/asm/mmu_context.h:158:17: error: use of undeclared identifier 'cpu_tlbstate_shared'
>> arch/x86/include/asm/mmu_context.h:158:17: error: use of undeclared identifier 'cpu_tlbstate_shared'
>> arch/x86/include/asm/mmu_context.h:158:17: error: use of undeclared identifier 'cpu_tlbstate_shared'
>> arch/x86/include/asm/mmu_context.h:158:17: error: use of undeclared identifier 'cpu_tlbstate_shared'
>> arch/x86/include/asm/mmu_context.h:158:17: error: use of undeclared identifier 'cpu_tlbstate_shared'
   fatal error: too many errors emitted, stopping now [-ferror-limit=]
   20 errors generated.


vim +/cpu_tlbstate +155 arch/x86/include/asm/mmu_context.h

   138	
   139	/*
   140	 * Please ignore the name of this function.  It should be called
   141	 * switch_to_kernel_thread().
   142	 *
   143	 * enter_lazy_tlb() is a hint from the scheduler that we are entering a
   144	 * kernel thread or other context without an mm.  Acceptable implementations
   145	 * include doing nothing whatsoever, switching to init_mm, or various clever
   146	 * lazy tricks to try to minimize TLB flushes.
   147	 *
   148	 * The scheduler reserves the right to call enter_lazy_tlb() several times
   149	 * in a row.  It will notify us that we're going back to a real mm by
   150	 * calling switch_mm_irqs_off().
   151	 */
   152	#define enter_lazy_tlb enter_lazy_tlb
   153	static __always_inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
   154	{
 > 155		if (this_cpu_read(cpu_tlbstate.loaded_mm) == &init_mm)
   156			return;
   157	
 > 158		this_cpu_write(cpu_tlbstate_shared.is_lazy, true);
   159	}
   160	

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

  reply	other threads:[~2025-11-09 14:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-08 17:23 [PATCH v2 0/4] Optimize code generation during context switching Xie Yuanbin
2025-11-08 17:23 ` [PATCH v2 1/4] Make enter_lazy_tlb inline on x86 Xie Yuanbin
2025-11-09 14:42   ` kernel test robot [this message]
2025-11-08 17:23 ` [PATCH v2 2/4] Make raw_spin_rq_unlock inline Xie Yuanbin
2025-11-08 17:23 ` [PATCH v2 3/4] Provide the always inline version of some functions Xie Yuanbin
2025-11-08 22:14   ` H. Peter Anvin
2025-11-09 11:51     ` Peter Zijlstra
2025-11-10 23:21       ` H. Peter Anvin
2025-11-09 11:31   ` Peter Zijlstra
2025-11-09 17:04     ` Xie Yuanbin
2025-11-09 17:35       ` Arnd Bergmann
2025-11-10 15:43         ` Xie Yuanbin
2025-11-08 17:23 ` [PATCH v2 4/4] Make finish_task_switch and its subfuncs inline in context switching Xie Yuanbin
2025-11-09 11:35   ` Peter Zijlstra

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=202511092219.73aMMES4-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=acme@kernel.org \
    --cc=agordeev@linux.ibm.com \
    --cc=alex@ghiti.fr \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=andreas@gaisler.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=borntraeger@linux.ibm.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=david@redhat.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=hpa@zytor.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=llvm@lists.linux.dev \
    --cc=luto@kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=palmer@dabbelt.com \
    --cc=paulmck@kernel.org \
    --cc=peterz@infradead.org \
    --cc=pjw@kernel.org \
    --cc=qq570070308@gmail.com \
    --cc=riel@surriel.com \
    --cc=segher@kernel.crashing.org \
    --cc=svens@linux.ibm.com \
    --cc=tglx@linutronix.de \
    /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