* [android-common:android17-6.18-2026-06 0/4] drivers/gpu/drm/drm_pagemap.c:459:21: warning: parameter 'addr' set but not used
@ 2026-07-08 22:38 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-07-08 22:38 UTC (permalink / raw)
To: cros-kernel-buildreports; +Cc: oe-kbuild-all
Hi Francois,
FYI, the error/warning still remains.
tree: https://android.googlesource.com/kernel/common android17-6.18-2026-06
head: 5b9136b9d339e45260ca901c1a3fb5857763df8a
commit: ddeda6136038b4b313bb6f9b44f2d363e1233814 [0/4] drm/pagemap: Allocate folios when possible
config: x86_64-buildonly-randconfig-005-20260709 (https://download.01.org/0day-ci/archive/20260709/202607090643.zi3q46ER-lkp@intel.com/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260709/202607090643.zi3q46ER-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
| Fixes: ddeda6136038 ("drm/pagemap: Allocate folios when possible")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202607090643.zi3q46ER-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from <built-in>:3:
In file included from include/linux/compiler_types.h:171:
include/linux/compiler-clang.h:28:9: warning: '__SANITIZE_ADDRESS__' macro redefined [-Wmacro-redefined]
28 | #define __SANITIZE_ADDRESS__
| ^
<built-in>:353:9: note: previous definition is here
353 | #define __SANITIZE_ADDRESS__ 1
| ^
>> drivers/gpu/drm/drm_pagemap.c:459:21: warning: parameter 'addr' set but not used [-Wunused-but-set-parameter]
459 | unsigned long addr)
| ^
2 warnings generated.
vim +/addr +459 drivers/gpu/drm/drm_pagemap.c
f86ad0ed620cb3 Matthew Brost 2025-06-19 435
f86ad0ed620cb3 Matthew Brost 2025-06-19 436 /**
f86ad0ed620cb3 Matthew Brost 2025-06-19 437 * drm_pagemap_migrate_populate_ram_pfn() - Populate RAM PFNs for a VM area
f86ad0ed620cb3 Matthew Brost 2025-06-19 438 * @vas: Pointer to the VM area structure, can be NULL
f86ad0ed620cb3 Matthew Brost 2025-06-19 439 * @fault_page: Fault page
f86ad0ed620cb3 Matthew Brost 2025-06-19 440 * @npages: Number of pages to populate
f86ad0ed620cb3 Matthew Brost 2025-06-19 441 * @mpages: Number of pages to migrate
f86ad0ed620cb3 Matthew Brost 2025-06-19 442 * @src_mpfn: Source array of migrate PFNs
f86ad0ed620cb3 Matthew Brost 2025-06-19 443 * @mpfn: Array of migrate PFNs to populate
f86ad0ed620cb3 Matthew Brost 2025-06-19 444 * @addr: Start address for PFN allocation
f86ad0ed620cb3 Matthew Brost 2025-06-19 445 *
f86ad0ed620cb3 Matthew Brost 2025-06-19 446 * This function populates the RAM migrate page frame numbers (PFNs) for the
f86ad0ed620cb3 Matthew Brost 2025-06-19 447 * specified VM area structure. It allocates and locks pages in the VM area for
f86ad0ed620cb3 Matthew Brost 2025-06-19 448 * RAM usage. If vas is non-NULL use alloc_page_vma for allocation, if NULL use
f86ad0ed620cb3 Matthew Brost 2025-06-19 449 * alloc_page for allocation.
f86ad0ed620cb3 Matthew Brost 2025-06-19 450 *
f86ad0ed620cb3 Matthew Brost 2025-06-19 451 * Return: 0 on success, negative error code on failure.
f86ad0ed620cb3 Matthew Brost 2025-06-19 452 */
f86ad0ed620cb3 Matthew Brost 2025-06-19 453 static int drm_pagemap_migrate_populate_ram_pfn(struct vm_area_struct *vas,
f86ad0ed620cb3 Matthew Brost 2025-06-19 454 struct page *fault_page,
f86ad0ed620cb3 Matthew Brost 2025-06-19 455 unsigned long npages,
f86ad0ed620cb3 Matthew Brost 2025-06-19 456 unsigned long *mpages,
f86ad0ed620cb3 Matthew Brost 2025-06-19 457 unsigned long *src_mpfn,
f86ad0ed620cb3 Matthew Brost 2025-06-19 458 unsigned long *mpfn,
f86ad0ed620cb3 Matthew Brost 2025-06-19 @459 unsigned long addr)
f86ad0ed620cb3 Matthew Brost 2025-06-19 460 {
f86ad0ed620cb3 Matthew Brost 2025-06-19 461 unsigned long i;
f86ad0ed620cb3 Matthew Brost 2025-06-19 462
ddeda6136038b4 Francois Dugast 2025-08-05 463 for (i = 0; i < npages;) {
ddeda6136038b4 Francois Dugast 2025-08-05 464 struct page *page = NULL, *src_page;
ddeda6136038b4 Francois Dugast 2025-08-05 465 struct folio *folio;
ddeda6136038b4 Francois Dugast 2025-08-05 466 unsigned int order = 0;
f86ad0ed620cb3 Matthew Brost 2025-06-19 467
f86ad0ed620cb3 Matthew Brost 2025-06-19 468 if (!(src_mpfn[i] & MIGRATE_PFN_MIGRATE))
ddeda6136038b4 Francois Dugast 2025-08-05 469 goto next;
f86ad0ed620cb3 Matthew Brost 2025-06-19 470
f86ad0ed620cb3 Matthew Brost 2025-06-19 471 src_page = migrate_pfn_to_page(src_mpfn[i]);
f86ad0ed620cb3 Matthew Brost 2025-06-19 472 if (!src_page)
ddeda6136038b4 Francois Dugast 2025-08-05 473 goto next;
f86ad0ed620cb3 Matthew Brost 2025-06-19 474
f86ad0ed620cb3 Matthew Brost 2025-06-19 475 if (fault_page) {
f86ad0ed620cb3 Matthew Brost 2025-06-19 476 if (src_page->zone_device_data !=
f86ad0ed620cb3 Matthew Brost 2025-06-19 477 fault_page->zone_device_data)
ddeda6136038b4 Francois Dugast 2025-08-05 478 goto next;
f86ad0ed620cb3 Matthew Brost 2025-06-19 479 }
f86ad0ed620cb3 Matthew Brost 2025-06-19 480
ddeda6136038b4 Francois Dugast 2025-08-05 481 order = folio_order(page_folio(src_page));
ddeda6136038b4 Francois Dugast 2025-08-05 482
ddeda6136038b4 Francois Dugast 2025-08-05 483 /* TODO: Support fallback to single pages if THP allocation fails */
f86ad0ed620cb3 Matthew Brost 2025-06-19 484 if (vas)
ddeda6136038b4 Francois Dugast 2025-08-05 485 folio = vma_alloc_folio(GFP_HIGHUSER, order, vas, addr);
f86ad0ed620cb3 Matthew Brost 2025-06-19 486 else
ddeda6136038b4 Francois Dugast 2025-08-05 487 folio = folio_alloc(GFP_HIGHUSER, order);
f86ad0ed620cb3 Matthew Brost 2025-06-19 488
ddeda6136038b4 Francois Dugast 2025-08-05 489 if (!folio)
f86ad0ed620cb3 Matthew Brost 2025-06-19 490 goto free_pages;
f86ad0ed620cb3 Matthew Brost 2025-06-19 491
ddeda6136038b4 Francois Dugast 2025-08-05 492 page = folio_page(folio, 0);
f86ad0ed620cb3 Matthew Brost 2025-06-19 493 mpfn[i] = migrate_pfn(page_to_pfn(page));
ddeda6136038b4 Francois Dugast 2025-08-05 494
ddeda6136038b4 Francois Dugast 2025-08-05 495 next:
ddeda6136038b4 Francois Dugast 2025-08-05 496 if (page)
ddeda6136038b4 Francois Dugast 2025-08-05 497 addr += page_size(page);
ddeda6136038b4 Francois Dugast 2025-08-05 498 else
ddeda6136038b4 Francois Dugast 2025-08-05 499 addr += PAGE_SIZE;
ddeda6136038b4 Francois Dugast 2025-08-05 500
ddeda6136038b4 Francois Dugast 2025-08-05 501 i += NR_PAGES(order);
f86ad0ed620cb3 Matthew Brost 2025-06-19 502 }
f86ad0ed620cb3 Matthew Brost 2025-06-19 503
ddeda6136038b4 Francois Dugast 2025-08-05 504 for (i = 0; i < npages;) {
f86ad0ed620cb3 Matthew Brost 2025-06-19 505 struct page *page = migrate_pfn_to_page(mpfn[i]);
ddeda6136038b4 Francois Dugast 2025-08-05 506 unsigned int order = 0;
f86ad0ed620cb3 Matthew Brost 2025-06-19 507
f86ad0ed620cb3 Matthew Brost 2025-06-19 508 if (!page)
ddeda6136038b4 Francois Dugast 2025-08-05 509 goto next_lock;
ddeda6136038b4 Francois Dugast 2025-08-05 510
ddeda6136038b4 Francois Dugast 2025-08-05 511 WARN_ON_ONCE(!folio_trylock(page_folio(page)));
f86ad0ed620cb3 Matthew Brost 2025-06-19 512
ddeda6136038b4 Francois Dugast 2025-08-05 513 order = folio_order(page_folio(page));
ddeda6136038b4 Francois Dugast 2025-08-05 514 *mpages += NR_PAGES(order);
ddeda6136038b4 Francois Dugast 2025-08-05 515
ddeda6136038b4 Francois Dugast 2025-08-05 516 next_lock:
ddeda6136038b4 Francois Dugast 2025-08-05 517 i += NR_PAGES(order);
f86ad0ed620cb3 Matthew Brost 2025-06-19 518 }
f86ad0ed620cb3 Matthew Brost 2025-06-19 519
f86ad0ed620cb3 Matthew Brost 2025-06-19 520 return 0;
f86ad0ed620cb3 Matthew Brost 2025-06-19 521
f86ad0ed620cb3 Matthew Brost 2025-06-19 522 free_pages:
ddeda6136038b4 Francois Dugast 2025-08-05 523 for (i = 0; i < npages;) {
f86ad0ed620cb3 Matthew Brost 2025-06-19 524 struct page *page = migrate_pfn_to_page(mpfn[i]);
ddeda6136038b4 Francois Dugast 2025-08-05 525 unsigned int order = 0;
f86ad0ed620cb3 Matthew Brost 2025-06-19 526
f86ad0ed620cb3 Matthew Brost 2025-06-19 527 if (!page)
ddeda6136038b4 Francois Dugast 2025-08-05 528 goto next_put;
f86ad0ed620cb3 Matthew Brost 2025-06-19 529
f86ad0ed620cb3 Matthew Brost 2025-06-19 530 put_page(page);
f86ad0ed620cb3 Matthew Brost 2025-06-19 531 mpfn[i] = 0;
ddeda6136038b4 Francois Dugast 2025-08-05 532
ddeda6136038b4 Francois Dugast 2025-08-05 533 order = folio_order(page_folio(page));
ddeda6136038b4 Francois Dugast 2025-08-05 534
ddeda6136038b4 Francois Dugast 2025-08-05 535 next_put:
ddeda6136038b4 Francois Dugast 2025-08-05 536 i += NR_PAGES(order);
f86ad0ed620cb3 Matthew Brost 2025-06-19 537 }
f86ad0ed620cb3 Matthew Brost 2025-06-19 538 return -ENOMEM;
f86ad0ed620cb3 Matthew Brost 2025-06-19 539 }
f86ad0ed620cb3 Matthew Brost 2025-06-19 540
:::::: The code at line 459 was first introduced by commit
:::::: f86ad0ed620cb3c91ec7d5468e93ac68d727539d drm/gpusvm, drm/pagemap: Move migration functionality to drm_pagemap
:::::: TO: Matthew Brost <matthew.brost@intel.com>
:::::: CC: Thomas Hellström <thomas.hellstrom@linux.intel.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-08 22:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-08 22:38 [android-common:android17-6.18-2026-06 0/4] drivers/gpu/drm/drm_pagemap.c:459:21: warning: parameter 'addr' set but not used kernel test robot
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.