[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202208021409.KLLd0NYP-lkp@intel.com>
Date: Tue, 2 Aug 2022 15:00:10 +0800
From: kernel test robot <lkp@...el.com>
To: Huacai Chen <chenhuacai@...ngson.cn>,
Arnd Bergmann <arnd@...db.de>,
Huacai Chen <chenhuacai@...nel.org>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Andy Lutomirski <luto@...nel.org>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Dinh Nguyen <dinguyen@...nel.org>
Cc: kbuild-all@...ts.01.org, loongarch@...ts.linux.dev,
linux-arch@...r.kernel.org, Xuefeng Li <lixuefeng@...ngson.cn>,
Guo Ren <guoren@...nel.org>, Xuerui Wang <kernel@...0n.name>,
Jiaxun Yang <jiaxun.yang@...goat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux Memory Management List <linux-mm@...ck.org>,
linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
Feiyang Chen <chenfeiyang@...ngson.cn>,
Min Zhou <zhoumin@...ngson.cn>
Subject: Re: [PATCH V6 2/4] LoongArch: Add sparse memory vmemmap support
Hi Huacai,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on soc/for-next]
[also build test WARNING on kvm/queue arm64/for-next/core linus/master v5.19]
[cannot apply to akpm-mm/mm-everything tip/x86/mm]
[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/Huacai-Chen/mm-sparse-vmemmap-Generalise-helpers-and-enable-for-LoongArch/20220728-194351
base: https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git for-next
config: loongarch-randconfig-p002-20220801 (https://download.01.org/0day-ci/archive/20220802/202208021409.KLLd0NYP-lkp@intel.com/config)
compiler: loongarch64-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/d391b94d4c12d54baaf038273712f8da86d50e8d
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Huacai-Chen/mm-sparse-vmemmap-Generalise-helpers-and-enable-for-LoongArch/20220728-194351
git checkout d391b94d4c12d54baaf038273712f8da86d50e8d
# 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=loongarch SHELL=/bin/bash arch/loongarch/mm/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
arch/loongarch/mm/init.c:161:15: warning: no previous prototype for 'vmemmap_populate_hugepages' [-Wmissing-prototypes]
161 | int __meminit vmemmap_populate_hugepages(unsigned long start, unsigned long end,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/loongarch/mm/init.c:223:6: warning: no previous prototype for 'vmemmap_free' [-Wmissing-prototypes]
223 | void vmemmap_free(unsigned long start, unsigned long end,
| ^~~~~~~~~~~~
vim +/vmemmap_free +223 arch/loongarch/mm/init.c
159
160 #ifdef CONFIG_SPARSEMEM_VMEMMAP
> 161 int __meminit vmemmap_populate_hugepages(unsigned long start, unsigned long end,
162 int node, struct vmem_altmap *altmap)
163 {
164 unsigned long addr = start;
165 unsigned long next;
166 pgd_t *pgd;
167 p4d_t *p4d;
168 pud_t *pud;
169 pmd_t *pmd;
170
171 for (addr = start; addr < end; addr = next) {
172 next = pmd_addr_end(addr, end);
173
174 pgd = vmemmap_pgd_populate(addr, node);
175 if (!pgd)
176 return -ENOMEM;
177 p4d = vmemmap_p4d_populate(pgd, addr, node);
178 if (!p4d)
179 return -ENOMEM;
180 pud = vmemmap_pud_populate(p4d, addr, node);
181 if (!pud)
182 return -ENOMEM;
183
184 pmd = pmd_offset(pud, addr);
185 if (pmd_none(*pmd)) {
186 void *p = NULL;
187
188 p = vmemmap_alloc_block_buf(PMD_SIZE, node, NULL);
189 if (p) {
190 pmd_t entry;
191
192 entry = pfn_pmd(virt_to_pfn(p), PAGE_KERNEL);
193 pmd_val(entry) |= _PAGE_HUGE | _PAGE_HGLOBAL;
194 set_pmd_at(&init_mm, addr, pmd, entry);
195
196 continue;
197 }
198 } else if (pmd_val(*pmd) & _PAGE_HUGE) {
199 vmemmap_verify((pte_t *)pmd, node, addr, next);
200 continue;
201 }
202 if (vmemmap_populate_basepages(addr, next, node, NULL))
203 return -ENOMEM;
204 }
205
206 return 0;
207 }
208
209 #if CONFIG_PGTABLE_LEVELS == 2
210 int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node,
211 struct vmem_altmap *altmap)
212 {
213 return vmemmap_populate_basepages(start, end, node, NULL);
214 }
215 #else
216 int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node,
217 struct vmem_altmap *altmap)
218 {
219 return vmemmap_populate_hugepages(start, end, node, NULL);
220 }
221 #endif
222
> 223 void vmemmap_free(unsigned long start, unsigned long end,
224 struct vmem_altmap *altmap)
225 {
226 }
227 #endif
228
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists