Hi Brendan, kernel test robot noticed the following build warnings: [auto build test WARNING on a38297e3fb012ddfa7ce0321a7e5a8daeb1872b6] url: https://github.com/intel-lab-lkp/linux/commits/Brendan-Jackman/mm-asi-Make-some-utility-functions-noinstr-compatible/20240713-012107 base: a38297e3fb012ddfa7ce0321a7e5a8daeb1872b6 patch link: https://lore.kernel.org/r/20240712-asi-rfc-24-v1-10-144b319a40d8%40google.com patch subject: [PATCH 10/26] mm: asi: Avoid warning from NMI userspace accesses in ASI context config: i386-buildonly-randconfig-004-20240714 (https://download.01.org/0day-ci/archive/20240714/202407141109.Vpmj3Sze-lkp@xxxxxxxxx/config) compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240714/202407141109.Vpmj3Sze-lkp@xxxxxxxxx/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@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202407141109.Vpmj3Sze-lkp@xxxxxxxxx/ All warnings (new ones prefixed by >>): >> arch/x86/mm/tlb.c:1329:20: warning: function 'cr3_matches_current_mm' is not needed and will not be emitted [-Wunneeded-internal-declaration] 1329 | static inline bool cr3_matches_current_mm(void) | ^~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. vim +/cr3_matches_current_mm +1329 arch/x86/mm/tlb.c 1328 > 1329 static inline bool cr3_matches_current_mm(void) 1330 { 1331 struct asi *asi = asi_get_current(); 1332 pgd_t *cr3_pgd; 1333 1334 /* 1335 * Prevent read_cr3_pa -> [NMI, asi_exit] -> asi_get_current, 1336 * otherwise we might find CR3 pointing to the ASI PGD but not 1337 * find a current ASI domain. 1338 */ 1339 barrier(); 1340 cr3_pgd = __va(read_cr3_pa()); 1341 1342 if (cr3_pgd == current->mm->pgd) 1343 return true; 1344 return asi && (cr3_pgd == asi_pgd(asi)); 1345 } 1346 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki