Hi liuyun,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: b52135712fc8eae0751505713e1caf086a1437d4 commit: 221e2e8bdbb851a519df0bac5a44298dae2b4612 [776/14354] LoongArch: add kernel setvirtmap for runtime config: loongarch-allnoconfig (https://download.01.org/0day-ci/archive/20241013/202410131602.KKBCfYOV-lkp@i...) compiler: loongarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241013/202410131602.KKBCfYOV-lkp@i...)
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/202410131602.KKBCfYOV-lkp@intel.com/
All errors (new ones prefixed by >>):
arch/loongarch/kernel/efi.c: In function 'efimap_populate_hugepages': arch/loongarch/kernel/efi.c:79:33: error: implicit declaration of function 'pmd_mkhuge'; did you mean 'pte_mkhuge'? [-Wimplicit-function-declaration] 79 | entry = pmd_mkhuge(entry); | ^~~~~~~~~~ | pte_mkhuge
arch/loongarch/kernel/efi.c:79:33: error: incompatible types when assigning to type 'pmd_t' from type 'int'
vim +79 arch/loongarch/kernel/efi.c
54 55 static int __init efimap_populate_hugepages( 56 unsigned long start, unsigned long end, 57 pgprot_t prot) 58 { 59 unsigned long addr; 60 unsigned long next; 61 pmd_t entry; 62 pud_t *pud; 63 pmd_t *pmd; 64 65 for (addr = start; addr < end; addr = next) { 66 next = pmd_addr_end(addr, end); 67 pud = pud_offset((p4d_t *)pgd_efi + pgd_index(addr), addr); 68 if (pud_none(*pud)) { 69 void *p = memblock_alloc_low(PAGE_SIZE, PAGE_SIZE); 70 71 if (!p) 72 return -1; 73 pmd_init(p); 74 pud_populate(&init_mm, pud, p); 75 } 76 pmd = pmd_offset(pud, addr); 77 if (pmd_none(*pmd)) { 78 entry = pfn_pmd((addr >> PAGE_SHIFT), prot);
79 entry = pmd_mkhuge(entry);
80 set_pmd_at(&init_mm, addr, pmd, entry); 81 } 82 } 83 return 0; 84 } 85