Re: [PATCH v8 5/6] powerpc/code-patching: Use temporary mm for Radix MMU
From: kernel test robot <hidden>
Date: 2022-10-24 08:48:59
Hi Benjamin, Thank you for the patch! Yet something to improve: [auto build test ERROR on 8636df94ec917019c4cb744ba0a1f94cf9057790] url: https://github.com/intel-lab-lkp/linux/commits/Benjamin-Gray/Use-per-CPU-temporary-mappings-for-patching/20221021-133129 base: 8636df94ec917019c4cb744ba0a1f94cf9057790 patch link: https://lore.kernel.org/r/20221021052238.580986-6-bgray%40linux.ibm.com patch subject: [PATCH v8 5/6] powerpc/code-patching: Use temporary mm for Radix MMU config: powerpc-tqm8xx_defconfig compiler: powerpc-linux-gcc (GCC) 12.1.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/13c3eee268f72a6f6b47b978b3c472b8bed253d9 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Benjamin-Gray/Use-per-CPU-temporary-mappings-for-patching/20221021-133129 git checkout 13c3eee268f72a6f6b47b978b3c472b8bed253d9 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot [off-list ref] All errors (new ones prefixed by >>): arch/powerpc/lib/code-patching.c: In function '__do_patch_instruction_mm':
quoted
arch/powerpc/lib/code-patching.c:355:9: error: implicit declaration of function 'local_flush_tlb_page_psize'; did you mean 'local_flush_tlb_page'? [-Werror=implicit-function-declaration]
355 | local_flush_tlb_page_psize(patching_mm, text_poke_addr, mmu_virtual_psize);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| local_flush_tlb_page
cc1: all warnings being treated as errors
vim +355 arch/powerpc/lib/code-patching.c
312
313 static int __do_patch_instruction_mm(u32 *addr, ppc_inst_t instr)
314 {
315 int err;
316 u32 *patch_addr;
317 unsigned long text_poke_addr;
318 pte_t *pte;
319 unsigned long pfn = get_patch_pfn(addr);
320 struct mm_struct *patching_mm;
321 struct temp_mm_state prev;
322
323 patching_mm = __this_cpu_read(cpu_patching_mm);
324 pte = __this_cpu_read(cpu_patching_pte);
325 text_poke_addr = __this_cpu_read(cpu_patching_addr);
326 patch_addr = (u32 *)(text_poke_addr + offset_in_page(addr));
327
328 if (unlikely(!patching_mm))
329 return -ENOMEM;
330
331 set_pte_at(patching_mm, text_poke_addr, pte, pfn_pte(pfn, PAGE_KERNEL));
332
333 /* order PTE update before use, also serves as the hwsync */
334 asm volatile("ptesync": : :"memory");
335
336 /* order context switch after arbitrary prior code */
337 isync();
338
339 prev = start_using_temp_mm(patching_mm);
340
341 err = __patch_instruction(addr, instr, patch_addr);
342
343 /* hwsync performed by __patch_instruction (sync) if successful */
344 if (err)
345 mb(); /* sync */
346
347 /* context synchronisation performed by __patch_instruction (isync or exception) */
348 stop_using_temp_mm(patching_mm, prev);
349
350 pte_clear(patching_mm, text_poke_addr, pte);
351 /*
352 * ptesync to order PTE update before TLB invalidation done
353 * by radix__local_flush_tlb_page_psize (in _tlbiel_va)
354 */
> 355 local_flush_tlb_page_psize(patching_mm, text_poke_addr, mmu_virtual_psize);
356
357 return err;
358 }
359
--
0-DAY CI Kernel Test Service
https://01.org/lkp