From: kernel test robot <lkp@intel.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Cc: oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: [linux-next:master 4432/4710] arch/powerpc/mm/init_64.c:201:15: error: no previous prototype for '__vmemmap_populate'
Date: Mon, 31 Jul 2023 11:26:18 +0800 [thread overview]
Message-ID: <202307311138.bn4Pj1Ht-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: d7b3af5a77e8d8da28f435f313e069aea5bcf172
commit: 30c80d3ed8d266bf42116b7f13dbb15b76989232 [4432/4710] powerpc/book3s64/radix: remove mmu_vmemmap_psize
config: powerpc-pasemi_defconfig (https://download.01.org/0day-ci/archive/20230731/202307311138.bn4Pj1Ht-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230731/202307311138.bn4Pj1Ht-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/202307311138.bn4Pj1Ht-lkp@intel.com/
All errors (new ones prefixed by >>):
>> arch/powerpc/mm/init_64.c:201:15: error: no previous prototype for '__vmemmap_populate' [-Werror=missing-prototypes]
201 | int __meminit __vmemmap_populate(unsigned long start, unsigned long end, int node,
| ^~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/__vmemmap_populate +201 arch/powerpc/mm/init_64.c
200
> 201 int __meminit __vmemmap_populate(unsigned long start, unsigned long end, int node,
202 struct vmem_altmap *altmap)
203 {
204 bool altmap_alloc;
205 unsigned long page_size = 1 << mmu_psize_defs[mmu_vmemmap_psize].shift;
206
207 /* Align to the page size of the linear mapping. */
208 start = ALIGN_DOWN(start, page_size);
209
210 pr_debug("vmemmap_populate %lx..%lx, node %d\n", start, end, node);
211
212 for (; start < end; start += page_size) {
213 void *p = NULL;
214 int rc;
215
216 /*
217 * This vmemmap range is backing different subsections. If any
218 * of that subsection is marked valid, that means we already
219 * have initialized a page table covering this range and hence
220 * the vmemmap range is populated.
221 */
222 if (vmemmap_populated(start, page_size))
223 continue;
224
225 /*
226 * Allocate from the altmap first if we have one. This may
227 * fail due to alignment issues when using 16MB hugepages, so
228 * fall back to system memory if the altmap allocation fail.
229 */
230 if (altmap && !altmap_cross_boundary(altmap, start, page_size)) {
231 p = vmemmap_alloc_block_buf(page_size, node, altmap);
232 if (!p)
233 pr_debug("altmap block allocation failed, falling back to system memory");
234 else
235 altmap_alloc = true;
236 }
237 if (!p) {
238 p = vmemmap_alloc_block_buf(page_size, node, NULL);
239 altmap_alloc = false;
240 }
241 if (!p)
242 return -ENOMEM;
243
244 if (vmemmap_list_populate(__pa(p), start, node)) {
245 /*
246 * If we don't populate vmemap list, we don't have
247 * the ability to free the allocated vmemmap
248 * pages in section_deactivate. Hence free them
249 * here.
250 */
251 int nr_pfns = page_size >> PAGE_SHIFT;
252 unsigned long page_order = get_order(page_size);
253
254 if (altmap_alloc)
255 vmem_altmap_free(altmap, nr_pfns);
256 else
257 free_pages((unsigned long)p, page_order);
258 return -ENOMEM;
259 }
260
261 pr_debug(" * %016lx..%016lx allocated at %p\n",
262 start, start + page_size, p);
263
264 rc = vmemmap_create_mapping(start, page_size, __pa(p));
265 if (rc < 0) {
266 pr_warn("%s: Unable to create vmemmap mapping: %d\n",
267 __func__, rc);
268 return -EFAULT;
269 }
270 }
271
272 return 0;
273 }
274
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-07-31 3:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202307311138.bn4Pj1Ht-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.ibm.com \
--cc=linux-mm@kvack.org \
--cc=oe-kbuild-all@lists.linux.dev \
/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