From: kernel test robot <lkp@intel.com>
To: Muchun Song <songmuchun@bytedance.com>
Cc: oe-kbuild-all@lists.linux.dev,
David Hildenbrand <david@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>,
mm-commits@vger.kernel.org
Subject: [akpm-mm:mm-new 360/388] arch/powerpc/mm/book3s64/radix_pgtable.c:1274:53: error: implicit declaration of function 'device_zone'; did you mean 'device_move'?
Date: Thu, 10 Sep 2026 17:42:34 +0200 [thread overview]
Message-ID: <202609100959.X16FvH9R-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-new
head: cf558a250cf4475a8936902b8978fbb6c61016f8
commit: 88ef4ca76f70778f2f51c9e749dc9bcc607a2424 [360/388] powerpc/mm: switch device DAX to shared tail vmemmap pages
config: powerpc64-allnoconfig-bpf (https://download.01.org/0day-ci/archive/20260910/202609100959.X16FvH9R-lkp@intel.com/config)
compiler: powerpc64-linux-gnu-gcc (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260910/202609100959.X16FvH9R-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/202609100959.X16FvH9R-lkp@intel.com/
All errors (new ones prefixed by >>):
arch/powerpc/mm/book3s64/radix_pgtable.c: In function 'vmemmap_populate_compound_pages':
>> arch/powerpc/mm/book3s64/radix_pgtable.c:1274:53: error: implicit declaration of function 'device_zone'; did you mean 'device_move'? [-Wimplicit-function-declaration]
1274 | tail_page = vmemmap_shared_tail_page(order, device_zone(node));
| ^~~~~~~~~~~
| device_move
>> arch/powerpc/mm/book3s64/radix_pgtable.c:1274:53: error: passing argument 2 of 'vmemmap_shared_tail_page' makes pointer from integer without a cast [-Wint-conversion]
1274 | tail_page = vmemmap_shared_tail_page(order, device_zone(node));
| ^~~~~~~~~~~~~~~~~
| |
| int
In file included from arch/powerpc/mm/book3s64/radix_pgtable.c:22:
./include/linux/vmemmap-optimization.h:89:72: note: expected 'struct zone *' but argument is of type 'int'
89 | struct page *vmemmap_shared_tail_page(unsigned int order, struct zone *zone);
| ~~~~~~~~~~~~~^~~~
vim +1274 arch/powerpc/mm/book3s64/radix_pgtable.c
1253
1254 int __meminit vmemmap_populate_compound_pages(unsigned long start_pfn,
1255 unsigned long start,
1256 unsigned long end, int node,
1257 struct dev_pagemap *pgmap)
1258 {
1259 /*
1260 * we want to map things as base page size mapping so that
1261 * we can save space in vmemmap. We could have huge mapping
1262 * covering out both edges.
1263 */
1264 unsigned long addr;
1265 unsigned long next;
1266 pgd_t *pgd;
1267 p4d_t *p4d;
1268 pud_t *pud;
1269 pmd_t *pmd;
1270 pte_t *pte;
1271 struct page *tail_page;
1272 unsigned int order = pfn_to_section_order(start_pfn);
1273
> 1274 tail_page = vmemmap_shared_tail_page(order, device_zone(node));
1275 if (!tail_page)
1276 return -ENOMEM;
1277
1278 for (addr = start; addr < end; addr = next) {
1279
1280 pgd = pgd_offset_k(addr);
1281 p4d = p4d_offset(pgd, addr);
1282 pud = vmemmap_pud_alloc(p4d, node, addr);
1283 if (!pud)
1284 return -ENOMEM;
1285 pmd = vmemmap_pmd_alloc(pud, node, addr);
1286 if (!pmd)
1287 return -ENOMEM;
1288
1289 if (pmd_leaf(READ_ONCE(*pmd))) {
1290 /* existing huge mapping. Skip the range */
1291 next = pmd_addr_end(addr, end);
1292 continue;
1293 }
1294 pte = vmemmap_pte_alloc(pmd, node, addr);
1295 if (!pte)
1296 return -ENOMEM;
1297 if (!pte_none(*pte)) {
1298 /*
1299 * This could be because we already have a compound
1300 * page whose VMEMMAP_RESERVE_NR pages were mapped and
1301 * this request fall in those pages.
1302 */
1303 next = addr + PAGE_SIZE;
1304 continue;
1305 } else {
1306 unsigned long nr_pages = 1UL << order;
1307 unsigned long addr_pfn = page_to_pfn((struct page *)addr);
1308 unsigned long pfn_offset = addr_pfn - ALIGN_DOWN(addr_pfn, nr_pages);
1309
1310 /*
1311 * if the address is aligned to huge page size it is the
1312 * head mapping.
1313 */
1314 if (pfn_offset == 0) {
1315 /* Populate the head page vmemmap page */
1316 pte = radix__vmemmap_pte_populate(pmd, addr, node, NULL, NULL);
1317 if (!pte)
1318 return -ENOMEM;
1319 vmemmap_verify(pte, node, addr, addr + PAGE_SIZE);
1320
1321 /*
1322 * Populate the tail pages vmemmap page
1323 * It can fall in different pmd, hence
1324 * vmemmap_populate_address()
1325 */
1326 pte = radix__vmemmap_populate_address(addr + PAGE_SIZE, node, NULL, NULL);
1327 if (!pte)
1328 return -ENOMEM;
1329
1330 next = addr + 2 * PAGE_SIZE;
1331 continue;
1332 }
1333
1334 pte = radix__vmemmap_pte_populate(pmd, addr, node, NULL, tail_page);
1335 if (!pte)
1336 return -ENOMEM;
1337 vmemmap_verify(pte, node, addr, addr + PAGE_SIZE);
1338
1339 next = addr + PAGE_SIZE;
1340 continue;
1341 }
1342 }
1343 return 0;
1344 }
1345
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-09-10 15:43 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=202609100959.X16FvH9R-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=linux-mm@kvack.org \
--cc=mm-commits@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=songmuchun@bytedance.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.