mailweb.openeuler.org
Manage this list

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

Kernel

Threads by month
  • ----- 2025 -----
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
kernel@openeuler.org

  • 52 participants
  • 18279 discussions
[openeuler:openEuler-1.0-LTS 1646/1646] mm/khugepaged.c:1336: warning: Function parameter or member 'reliable' not described in 'collapse_shmem'
by kernel test robot 20 May '25

20 May '25
Hi Ma, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 2eb609d2f89b2d85d89cb018c3f97050989807e2 commit: ff0fb9e816fac221fa24a1810dd895745406070b [1646/1646] mm: thp: Add memory reliable support for hugepaged collapse config: x86_64-buildonly-randconfig-002-20250520 (https://download.01.org/0day-ci/archive/20250520/202505202138.LT7VPPBg-lkp@…) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250520/202505202138.LT7VPPBg-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202505202138.LT7VPPBg-lkp@intel.com/ All warnings (new ones prefixed by >>): mm/khugepaged.c:1336: warning: Function parameter or member 'mm' not described in 'collapse_shmem' mm/khugepaged.c:1336: warning: Function parameter or member 'mapping' not described in 'collapse_shmem' mm/khugepaged.c:1336: warning: Function parameter or member 'start' not described in 'collapse_shmem' mm/khugepaged.c:1336: warning: Function parameter or member 'hpage' not described in 'collapse_shmem' mm/khugepaged.c:1336: warning: Function parameter or member 'node' not described in 'collapse_shmem' >> mm/khugepaged.c:1336: warning: Function parameter or member 'reliable' not described in 'collapse_shmem' vim +1336 mm/khugepaged.c f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1314 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1315 /** f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1316 * collapse_shmem - collapse small tmpfs/shmem pages into huge one. f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1317 * f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1318 * Basic scheme is simple, details are more complex: af24c01831e4e21 Hugh Dickins 2018-11-30 1319 * - allocate and lock a new huge page; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1320 * - scan over radix tree replacing old pages the new one f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1321 * + swap in pages if necessary; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1322 * + fill in gaps; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1323 * + keep old pages around in case if rollback is required; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1324 * - if replacing succeed: f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1325 * + copy data over; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1326 * + free old pages; af24c01831e4e21 Hugh Dickins 2018-11-30 1327 * + unlock huge page; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1328 * - if replacing failed; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1329 * + put all pages back and unfreeze them; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1330 * + restore gaps in the radix-tree; af24c01831e4e21 Hugh Dickins 2018-11-30 1331 * + unlock and free huge page; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1332 */ f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1333 static void collapse_shmem(struct mm_struct *mm, f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1334 struct address_space *mapping, pgoff_t start, ff0fb9e816fac22 Ma Wupeng 2022-02-09 1335 struct page **hpage, int node, bool reliable) f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 @1336 { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1337 gfp_t gfp; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1338 struct page *page, *new_page, *tmp; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1339 struct mem_cgroup *memcg; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1340 pgoff_t index, end = start + HPAGE_PMD_NR; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1341 LIST_HEAD(pagelist); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1342 struct radix_tree_iter iter; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1343 void **slot; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1344 int nr_none = 0, result = SCAN_SUCCEED; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1345 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1346 VM_BUG_ON(start & (HPAGE_PMD_NR - 1)); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1347 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1348 /* Only allocate from the target node */ 41b6167e8f746b4 Michal Hocko 2017-01-10 1349 gfp = alloc_hugepage_khugepaged_gfpmask() | __GFP_THISNODE; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1350 ff0fb9e816fac22 Ma Wupeng 2022-02-09 1351 if (reliable) ff0fb9e816fac22 Ma Wupeng 2022-02-09 1352 gfp |= ___GFP_RELIABILITY; ff0fb9e816fac22 Ma Wupeng 2022-02-09 1353 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1354 new_page = khugepaged_alloc_page(hpage, gfp, node); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1355 if (!new_page) { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1356 result = SCAN_ALLOC_HUGE_PAGE_FAIL; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1357 goto out; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1358 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1359 2a70f6a76bb86d1 Michal Hocko 2018-04-10 1360 if (unlikely(mem_cgroup_try_charge(new_page, mm, gfp, &memcg, true))) { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1361 result = SCAN_CGROUP_CHARGE_FAIL; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1362 goto out; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1363 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1364 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1365 __SetPageLocked(new_page); 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1366 __SetPageSwapBacked(new_page); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1367 new_page->index = start; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1368 new_page->mapping = mapping; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1369 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1370 /* af24c01831e4e21 Hugh Dickins 2018-11-30 1371 * At this point the new_page is locked and not up-to-date. af24c01831e4e21 Hugh Dickins 2018-11-30 1372 * It's safe to insert it into the page cache, because nobody would af24c01831e4e21 Hugh Dickins 2018-11-30 1373 * be able to map it or use it in another way until we unlock it. f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1374 */ f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1375 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1376 index = start; b93b016313b3ba8 Matthew Wilcox 2018-04-10 1377 xa_lock_irq(&mapping->i_pages); b93b016313b3ba8 Matthew Wilcox 2018-04-10 1378 radix_tree_for_each_slot(slot, &mapping->i_pages, &iter, start) { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1379 int n = min(iter.index, end) - index; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1380 8797f2f4fe0d555 Hugh Dickins 2018-11-30 1381 /* 8797f2f4fe0d555 Hugh Dickins 2018-11-30 1382 * Stop if extent has been hole-punched, and is now completely 8797f2f4fe0d555 Hugh Dickins 2018-11-30 1383 * empty (the more obvious i_size_read() check would take an 8797f2f4fe0d555 Hugh Dickins 2018-11-30 1384 * irq-unsafe seqlock on 32-bit). 8797f2f4fe0d555 Hugh Dickins 2018-11-30 1385 */ 8797f2f4fe0d555 Hugh Dickins 2018-11-30 1386 if (n >= HPAGE_PMD_NR) { 8797f2f4fe0d555 Hugh Dickins 2018-11-30 1387 result = SCAN_TRUNCATED; 8797f2f4fe0d555 Hugh Dickins 2018-11-30 1388 goto tree_locked; 8797f2f4fe0d555 Hugh Dickins 2018-11-30 1389 } 8797f2f4fe0d555 Hugh Dickins 2018-11-30 1390 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1391 /* f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1392 * Handle holes in the radix tree: charge it from shmem and f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1393 * insert relevant subpage of new_page into the radix-tree. f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1394 */ f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1395 if (n && !shmem_charge(mapping->host, n)) { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1396 result = SCAN_FAIL; 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1397 goto tree_locked; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1398 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1399 for (; index < min(iter.index, end); index++) { b93b016313b3ba8 Matthew Wilcox 2018-04-10 1400 radix_tree_insert(&mapping->i_pages, index, f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1401 new_page + (index % HPAGE_PMD_NR)); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1402 } 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1403 nr_none += n; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1404 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1405 /* We are done. */ f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1406 if (index >= end) f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1407 break; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1408 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1409 page = radix_tree_deref_slot_protected(slot, b93b016313b3ba8 Matthew Wilcox 2018-04-10 1410 &mapping->i_pages.xa_lock); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1411 if (radix_tree_exceptional_entry(page) || !PageUptodate(page)) { b93b016313b3ba8 Matthew Wilcox 2018-04-10 1412 xa_unlock_irq(&mapping->i_pages); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1413 /* swap in or instantiate fallocated page */ f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1414 if (shmem_getpage(mapping->host, index, &page, f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1415 SGP_NOHUGE)) { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1416 result = SCAN_FAIL; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1417 goto tree_unlocked; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1418 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1419 } else if (trylock_page(page)) { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1420 get_page(page); 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1421 xa_unlock_irq(&mapping->i_pages); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1422 } else { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1423 result = SCAN_PAGE_LOCK; 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1424 goto tree_locked; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1425 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1426 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1427 /* b93b016313b3ba8 Matthew Wilcox 2018-04-10 1428 * The page must be locked, so we can drop the i_pages lock f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1429 * without racing with truncate. f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1430 */ f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1431 VM_BUG_ON_PAGE(!PageLocked(page), page); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1432 VM_BUG_ON_PAGE(!PageUptodate(page), page); 8b37c40503eadc6 Hugh Dickins 2018-11-30 1433 8b37c40503eadc6 Hugh Dickins 2018-11-30 1434 /* 8b37c40503eadc6 Hugh Dickins 2018-11-30 1435 * If file was truncated then extended, or hole-punched, before 8b37c40503eadc6 Hugh Dickins 2018-11-30 1436 * we locked the first page, then a THP might be there already. 8b37c40503eadc6 Hugh Dickins 2018-11-30 1437 */ 8b37c40503eadc6 Hugh Dickins 2018-11-30 1438 if (PageTransCompound(page)) { 8b37c40503eadc6 Hugh Dickins 2018-11-30 1439 result = SCAN_PAGE_COMPOUND; 8b37c40503eadc6 Hugh Dickins 2018-11-30 1440 goto out_unlock; 8b37c40503eadc6 Hugh Dickins 2018-11-30 1441 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1442 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1443 if (page_mapping(page) != mapping) { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1444 result = SCAN_TRUNCATED; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1445 goto out_unlock; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1446 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1447 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1448 if (isolate_lru_page(page)) { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1449 result = SCAN_DEL_PAGE_LRU; 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1450 goto out_unlock; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1451 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1452 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1453 if (page_mapped(page)) 977fbdcd5986c9f Matthew Wilcox 2018-01-31 1454 unmap_mapping_pages(mapping, index, 1, false); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1455 b93b016313b3ba8 Matthew Wilcox 2018-04-10 1456 xa_lock_irq(&mapping->i_pages); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1457 b93b016313b3ba8 Matthew Wilcox 2018-04-10 1458 slot = radix_tree_lookup_slot(&mapping->i_pages, index); 91a45f71078a656 Johannes Weiner 2016-12-12 1459 VM_BUG_ON_PAGE(page != radix_tree_deref_slot_protected(slot, b93b016313b3ba8 Matthew Wilcox 2018-04-10 1460 &mapping->i_pages.xa_lock), page); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1461 VM_BUG_ON_PAGE(page_mapped(page), page); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1462 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1463 /* f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1464 * The page is expected to have page_count() == 3: f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1465 * - we hold a pin on it; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1466 * - one reference from radix tree; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1467 * - one from isolate_lru_page; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1468 */ f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1469 if (!page_ref_freeze(page, 3)) { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1470 result = SCAN_PAGE_COUNT; 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1471 xa_unlock_irq(&mapping->i_pages); 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1472 putback_lru_page(page); 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1473 goto out_unlock; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1474 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1475 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1476 /* f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1477 * Add the page to the list to be able to undo the collapse if f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1478 * something go wrong. f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1479 */ f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1480 list_add_tail(&page->lru, &pagelist); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1481 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1482 /* Finally, replace with the new page. */ b93b016313b3ba8 Matthew Wilcox 2018-04-10 1483 radix_tree_replace_slot(&mapping->i_pages, slot, f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1484 new_page + (index % HPAGE_PMD_NR)); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1485 148deab223b2373 Matthew Wilcox 2016-12-14 1486 slot = radix_tree_iter_resume(slot, &iter); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1487 index++; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1488 continue; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1489 out_unlock: f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1490 unlock_page(page); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1491 put_page(page); 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1492 goto tree_unlocked; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1493 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1494 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1495 /* f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1496 * Handle hole in radix tree at the end of the range. f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1497 * This code only triggers if there's nothing in radix tree f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1498 * beyond 'end'. f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1499 */ 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1500 if (index < end) { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1501 int n = end - index; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1502 8797f2f4fe0d555 Hugh Dickins 2018-11-30 1503 /* Stop if extent has been truncated, and is now empty */ 8797f2f4fe0d555 Hugh Dickins 2018-11-30 1504 if (n >= HPAGE_PMD_NR) { 8797f2f4fe0d555 Hugh Dickins 2018-11-30 1505 result = SCAN_TRUNCATED; 8797f2f4fe0d555 Hugh Dickins 2018-11-30 1506 goto tree_locked; 8797f2f4fe0d555 Hugh Dickins 2018-11-30 1507 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1508 if (!shmem_charge(mapping->host, n)) { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1509 result = SCAN_FAIL; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1510 goto tree_locked; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1511 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1512 for (; index < end; index++) { b93b016313b3ba8 Matthew Wilcox 2018-04-10 1513 radix_tree_insert(&mapping->i_pages, index, f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1514 new_page + (index % HPAGE_PMD_NR)); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1515 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1516 nr_none += n; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1517 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1518 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1519 __inc_node_page_state(new_page, NR_SHMEM_THPS); 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1520 if (nr_none) { 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1521 struct zone *zone = page_zone(new_page); 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1522 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1523 __mod_node_page_state(zone->zone_pgdat, NR_FILE_PAGES, nr_none); 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1524 __mod_node_page_state(zone->zone_pgdat, NR_SHMEM, nr_none); 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1525 } 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1526 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1527 tree_locked: b93b016313b3ba8 Matthew Wilcox 2018-04-10 1528 xa_unlock_irq(&mapping->i_pages); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1529 tree_unlocked: f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1530 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1531 if (result == SCAN_SUCCEED) { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1532 /* f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1533 * Replacing old pages with new one has succeed, now we need to f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1534 * copy the content and free old pages. f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1535 */ ee13d69bc1e8a55 Hugh Dickins 2018-11-30 1536 index = start; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1537 list_for_each_entry_safe(page, tmp, &pagelist, lru) { ee13d69bc1e8a55 Hugh Dickins 2018-11-30 1538 while (index < page->index) { ee13d69bc1e8a55 Hugh Dickins 2018-11-30 1539 clear_highpage(new_page + (index % HPAGE_PMD_NR)); ee13d69bc1e8a55 Hugh Dickins 2018-11-30 1540 index++; ee13d69bc1e8a55 Hugh Dickins 2018-11-30 1541 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1542 copy_highpage(new_page + (page->index % HPAGE_PMD_NR), f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1543 page); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1544 list_del(&page->lru); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1545 page->mapping = NULL; 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1546 page_ref_unfreeze(page, 1); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1547 ClearPageActive(page); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1548 ClearPageUnevictable(page); 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1549 unlock_page(page); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1550 put_page(page); ee13d69bc1e8a55 Hugh Dickins 2018-11-30 1551 index++; ee13d69bc1e8a55 Hugh Dickins 2018-11-30 1552 } ee13d69bc1e8a55 Hugh Dickins 2018-11-30 1553 while (index < end) { ee13d69bc1e8a55 Hugh Dickins 2018-11-30 1554 clear_highpage(new_page + (index % HPAGE_PMD_NR)); ee13d69bc1e8a55 Hugh Dickins 2018-11-30 1555 index++; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1556 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1557 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1558 SetPageUptodate(new_page); af24c01831e4e21 Hugh Dickins 2018-11-30 1559 page_ref_add(new_page, HPAGE_PMD_NR - 1); 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1560 set_page_dirty(new_page); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1561 mem_cgroup_commit_charge(new_page, memcg, false, true); 9d5425af85abe36 Chris Down 2021-06-30 1562 count_memcg_events(memcg, THP_COLLAPSE_ALLOC, 1); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1563 lru_cache_add_anon(new_page); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1564 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1565 /* 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1566 * Remove pte page tables, so we can re-fault the page as huge. 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1567 */ 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1568 retract_page_tables(mapping, start); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1569 *hpage = NULL; 87aa752906ecf69 Yang Shi 2018-08-17 1570 87aa752906ecf69 Yang Shi 2018-08-17 1571 khugepaged_pages_collapsed++; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1572 } else { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1573 /* Something went wrong: rollback changes to the radix-tree */ b93b016313b3ba8 Matthew Wilcox 2018-04-10 1574 xa_lock_irq(&mapping->i_pages); 78141aabfbb9560 Hugh Dickins 2018-11-30 1575 mapping->nrpages -= nr_none; 78141aabfbb9560 Hugh Dickins 2018-11-30 1576 shmem_uncharge(mapping->host, nr_none); 78141aabfbb9560 Hugh Dickins 2018-11-30 1577 b93b016313b3ba8 Matthew Wilcox 2018-04-10 1578 radix_tree_for_each_slot(slot, &mapping->i_pages, &iter, start) { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1579 if (iter.index >= end) f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1580 break; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1581 page = list_first_entry_or_null(&pagelist, f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1582 struct page, lru); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1583 if (!page || iter.index < page->index) { f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1584 if (!nr_none) f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1585 break; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1586 nr_none--; 59749e6ce53735d Johannes Weiner 2016-12-12 1587 /* Put holes back where they were */ b93b016313b3ba8 Matthew Wilcox 2018-04-10 1588 radix_tree_delete(&mapping->i_pages, iter.index); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1589 continue; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1590 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1591 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1592 VM_BUG_ON_PAGE(page->index != iter.index, page); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1593 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1594 /* Unfreeze the page. */ f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1595 list_del(&page->lru); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1596 page_ref_unfreeze(page, 2); b93b016313b3ba8 Matthew Wilcox 2018-04-10 1597 radix_tree_replace_slot(&mapping->i_pages, slot, page); 148deab223b2373 Matthew Wilcox 2016-12-14 1598 slot = radix_tree_iter_resume(slot, &iter); b93b016313b3ba8 Matthew Wilcox 2018-04-10 1599 xa_unlock_irq(&mapping->i_pages); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1600 unlock_page(page); 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1601 putback_lru_page(page); b93b016313b3ba8 Matthew Wilcox 2018-04-10 1602 xa_lock_irq(&mapping->i_pages); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1603 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1604 VM_BUG_ON(nr_none); b93b016313b3ba8 Matthew Wilcox 2018-04-10 1605 xa_unlock_irq(&mapping->i_pages); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1606 f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1607 mem_cgroup_cancel_charge(new_page, memcg, true); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1608 new_page->mapping = NULL; f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1609 } 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1610 3e9646c76cb91d6 Hugh Dickins 2018-11-30 1611 unlock_page(new_page); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1612 out: f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1613 VM_BUG_ON(!list_empty(&pagelist)); f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1614 /* TODO: tracepoints */ f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1615 } f3f0e1d2150b2b9 Kirill A. Shutemov 2016-07-26 1616 :::::: The code at line 1336 was first introduced by commit :::::: f3f0e1d2150b2b99da2cbdfaad000089efe9bf30 khugepaged: add support of collapse for tmpfs/shmem pages :::::: TO: Kirill A. Shutemov <kirill.shutemov(a)linux.intel.com> :::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1646/1646] mm/maccess.c:64:6: warning: no previous prototype for '__probe_user_read'
by kernel test robot 20 May '25

20 May '25
Hi Masami, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 2eb609d2f89b2d85d89cb018c3f97050989807e2 commit: 5c5bac1227aee80ee106ec07b32c981558049304 [1646/1646] uaccess: Add non-pagefault user-space read functions config: x86_64-buildonly-randconfig-002-20250520 (https://download.01.org/0day-ci/archive/20250520/202505202028.GvFwJHdW-lkp@…) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250520/202505202028.GvFwJHdW-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202505202028.GvFwJHdW-lkp@intel.com/ All warnings (new ones prefixed by >>): >> mm/maccess.c:64:6: warning: no previous prototype for '__probe_user_read' [-Wmissing-prototypes] 64 | long __probe_user_read(void *dst, const void __user *src, size_t size) | ^~~~~~~~~~~~~~~~~ vim +/__probe_user_read +64 mm/maccess.c 50 51 /** 52 * probe_user_read(): safely attempt to read from a user-space location 53 * @dst: pointer to the buffer that shall take the data 54 * @src: address to read from. This must be a user address. 55 * @size: size of the data chunk 56 * 57 * Safely read from user address @src to the buffer at @dst. If a kernel fault 58 * happens, handle that and return -EFAULT. 59 */ 60 61 long __weak probe_user_read(void *dst, const void __user *src, size_t size) 62 __attribute__((alias("__probe_user_read"))); 63 > 64 long __probe_user_read(void *dst, const void __user *src, size_t size) 65 { 66 long ret = -EFAULT; 67 mm_segment_t old_fs = get_fs(); 68 69 set_fs(USER_DS); 70 if (access_ok(src, size)) 71 ret = probe_read_common(dst, src, size); 72 set_fs(old_fs); 73 74 return ret; 75 } 76 EXPORT_SYMBOL_GPL(probe_user_read); 77 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 2259/2259] drivers/scsi/linkdata/ps3stor/./linux/ps3_base.c:545:5: error: no previous prototype for 'ps3_pci_init'
by kernel test robot 20 May '25

20 May '25
Hi liujie_answer, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: e69c6375f883badcc9ec4c9e9ed85660ac3fb1bf commit: 97a2bb6ece556f3882263ee8df2b77f10c511311 [2259/2259] SCSI: Linkdata: Supports Linkdata HBA/RAID Controllers config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20250520/202505201929.AHI9gRxc-lkp@…) compiler: loongarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250520/202505201929.AHI9gRxc-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202505201929.AHI9gRxc-lkp@intel.com/ All errors (new ones prefixed by >>): >> drivers/scsi/linkdata/ps3stor/ps3_ioc_manager.c:307:5: error: no previous prototype for 'ps3_hard_reset_to_ready' [-Werror=missing-prototypes] 307 | int ps3_hard_reset_to_ready(struct ps3_instance *instance) | ^~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors -- >> drivers/scsi/linkdata/ps3stor/ps3_scsi_cmd_err.c:876:6: error: no previous prototype for 'ps3_set_task_manager_busy' [-Werror=missing-prototypes] 876 | void ps3_set_task_manager_busy(struct ps3_instance *instance, | ^~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/scsi/linkdata/ps3stor/ps3_scsi_cmd_err.c:1110:5: error: no previous prototype for 'ps3_wait_for_outstanding_complete' [-Werror=missing-prototypes] 1110 | int ps3_wait_for_outstanding_complete(struct ps3_instance *instance) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors -- >> drivers/scsi/linkdata/ps3stor/ps3_cmd_complete.c:131:6: error: no previous prototype for 'ps3_trigger_irq_poll' [-Werror=missing-prototypes] 131 | void ps3_trigger_irq_poll(struct ps3_irq *irq) | ^~~~~~~~~~~~~~~~~~~~ >> drivers/scsi/linkdata/ps3stor/ps3_cmd_complete.c:243:5: error: no previous prototype for 'ps3_resp_status_convert' [-Werror=missing-prototypes] 243 | int ps3_resp_status_convert(unsigned int resp_status) | ^~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors -- >> drivers/scsi/linkdata/ps3stor/ps3_qos.c:211:1: error: no previous prototype for 'ps3_qos_cmd_waitq_get' [-Werror=missing-prototypes] 211 | ps3_qos_cmd_waitq_get(struct ps3_qos_tg_context *qos_tg_ctx, | ^~~~~~~~~~~~~~~~~~~~~ >> drivers/scsi/linkdata/ps3stor/ps3_qos.c:335:15: error: no previous prototype for 'ps3_qos_vd_cmdword_get' [-Werror=missing-prototypes] 335 | unsigned char ps3_qos_vd_cmdword_get(struct ps3_cmd *cmd) | ^~~~~~~~~~~~~~~~~~~~~~ >> drivers/scsi/linkdata/ps3stor/ps3_qos.c:351:15: error: no previous prototype for 'ps3_qos_exclusive_cmdword_get' [-Werror=missing-prototypes] 351 | unsigned char ps3_qos_exclusive_cmdword_get(struct ps3_cmd *cmd) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/scsi/linkdata/ps3stor/ps3_qos.c:363:15: error: no previous prototype for 'ps3_qos_tg_decision' [-Werror=missing-prototypes] 363 | unsigned char ps3_qos_tg_decision(struct ps3_cmd *cmd) | ^~~~~~~~~~~~~~~~~~~ >> drivers/scsi/linkdata/ps3stor/ps3_qos.c:749:15: error: no previous prototype for 'ps3_qos_all_pd_rc_get' [-Werror=missing-prototypes] 749 | unsigned char ps3_qos_all_pd_rc_get(struct ps3_cmd *cmd) | ^~~~~~~~~~~~~~~~~~~~~ >> drivers/scsi/linkdata/ps3stor/ps3_qos.c:876:6: error: no previous prototype for 'ps3_pd_quota_waitq_clear_all' [-Werror=missing-prototypes] 876 | void ps3_pd_quota_waitq_clear_all(struct ps3_qos_pd_mgr *qos_pd_mgr, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/scsi/linkdata/ps3stor/ps3_qos.c:892:6: error: no previous prototype for 'ps3_pd_quota_waitq_clean' [-Werror=missing-prototypes] 892 | void ps3_pd_quota_waitq_clean(struct ps3_qos_pd_mgr *qos_pd_mgr, | ^~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/scsi/linkdata/ps3stor/ps3_qos.c:1058:6: error: no previous prototype for 'ps3_qos_pd_waitq_ratio_update' [-Werror=missing-prototypes] 1058 | void ps3_qos_pd_waitq_ratio_update(struct ps3_qos_pd_mgr *qos_pd_mgr) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/scsi/linkdata/ps3stor/ps3_qos.c:2019:15: error: no previous prototype for 'ps3_hba_qos_decision' [-Werror=missing-prototypes] 2019 | unsigned char ps3_hba_qos_decision(struct ps3_cmd *cmd) | ^~~~~~~~~~~~~~~~~~~~ >> drivers/scsi/linkdata/ps3stor/ps3_qos.c:2040:6: error: no previous prototype for 'ps3_hba_qos_waitq_notify' [-Werror=missing-prototypes] 2040 | void ps3_hba_qos_waitq_notify(struct ps3_instance *instance) | ^~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/scsi/linkdata/ps3stor/ps3_qos.c:2100:6: error: no previous prototype for 'ps3_cmd_waitq_abort' [-Werror=missing-prototypes] 2100 | bool ps3_cmd_waitq_abort(struct ps3_cmd *aborted_cmd) | ^~~~~~~~~~~~~~~~~~~ >> drivers/scsi/linkdata/ps3stor/ps3_qos.c:2463:6: error: no previous prototype for 'ps3_hba_qos_waitq_clear_all' [-Werror=missing-prototypes] 2463 | void ps3_hba_qos_waitq_clear_all(struct ps3_instance *instance, int resp_status) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/scsi/linkdata/ps3stor/ps3_qos.c:2827:6: error: no previous prototype for 'ps3_hba_qos_vd_init' [-Werror=missing-prototypes] 2827 | void ps3_hba_qos_vd_init(struct ps3_instance *instance, | ^~~~~~~~~~~~~~~~~~~ >> drivers/scsi/linkdata/ps3stor/ps3_qos.c:2936:6: error: no previous prototype for 'ps3_hba_qos_vd_reset' [-Werror=missing-prototypes] 2936 | void ps3_hba_qos_vd_reset(struct ps3_instance *instance, unsigned short disk_id) | ^~~~~~~~~~~~~~~~~~~~ >> drivers/scsi/linkdata/ps3stor/ps3_qos.c:3023:6: error: no previous prototype for 'ps3_hba_qos_waitq_poll' [-Werror=missing-prototypes] 3023 | void ps3_hba_qos_waitq_poll(struct ps3_instance *instance) | ^~~~~~~~~~~~~~~~~~~~~~ >> drivers/scsi/linkdata/ps3stor/ps3_qos.c:3279:15: error: no previous prototype for 'ps3_raid_qos_decision' [-Werror=missing-prototypes] 3279 | unsigned char ps3_raid_qos_decision(struct ps3_cmd *cmd) | ^~~~~~~~~~~~~~~~~~~~~ >> drivers/scsi/linkdata/ps3stor/ps3_qos.c:3334:6: error: no previous prototype for 'ps3_qos_mgrq_resend' [-Werror=missing-prototypes] 3334 | void ps3_qos_mgrq_resend(struct ps3_qos_softq_mgr *softq_mgr) | ^~~~~~~~~~~~~~~~~~~ >> drivers/scsi/linkdata/ps3stor/ps3_qos.c:3478:6: error: no previous prototype for 'ps3_raid_qos_waitq_notify' [-Werror=missing-prototypes] 3478 | void ps3_raid_qos_waitq_notify(struct ps3_instance *instance) | ^~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/scsi/linkdata/ps3stor/ps3_qos.c:3821:15: error: no previous prototype for 'ps3_raid_qos_waitq_abort' [-Werror=missing-prototypes] 3821 | unsigned char ps3_raid_qos_waitq_abort(struct ps3_cmd *cmd) | ^~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/scsi/linkdata/ps3stor/ps3_qos.c:4022:6: error: no previous prototype for 'ps3_raid_qos_waitq_clear_all' [-Werror=missing-prototypes] 4022 | void ps3_raid_qos_waitq_clear_all(struct ps3_instance *instance, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/linkdata/ps3stor/ps3_qos.c:4083:6: error: no previous prototype for 'ps3_raid_qos_waitq_poll' [-Werror=missing-prototypes] 4083 | void ps3_raid_qos_waitq_poll(struct ps3_instance *instance) | ^~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors -- >> drivers/scsi/linkdata/ps3stor/ps3_cmd_statistics.c:85:6: error: no previous prototype for 'ps3_cmd_stat_content_clear' [-Werror=missing-prototypes] 85 | void ps3_cmd_stat_content_clear(struct ps3_instance *instance) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/scsi/linkdata/ps3stor/ps3_cmd_statistics.c:403:6: error: no previous prototype for 'ps3_io_recv_ok_stat_inc' [-Werror=missing-prototypes] 403 | void ps3_io_recv_ok_stat_inc(struct ps3_instance *ins, | ^~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors -- >> drivers/scsi/linkdata/ps3stor/ps3_ioctl.c:785:6: error: no previous prototype for 'ps3_clean_mgr_cmd' [-Werror=missing-prototypes] 785 | void ps3_clean_mgr_cmd(struct ps3_instance *instance) | ^~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors -- >> drivers/scsi/linkdata/ps3stor/ps3_r1x_write_lock.c:578:5: error: no previous prototype for 'ps3_r1x_hash_bit_check' [-Werror=missing-prototypes] 578 | int ps3_r1x_hash_bit_check(struct ps3_r1x_hash_bit_mgr *hash_mgr, | ^~~~~~~~~~~~~~~~~~~~~~ >> drivers/scsi/linkdata/ps3stor/ps3_r1x_write_lock.c:678:6: error: no previous prototype for 'ps3_r1x_conflict_queue_hash_bit_lock' [-Werror=missing-prototypes] 678 | void ps3_r1x_conflict_queue_hash_bit_lock(struct ps3_r1x_lock_mgr *mgr, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/scsi/linkdata/ps3stor/ps3_r1x_write_lock.c:730:5: error: no previous prototype for 'ps3_r1x_hash_bit_lock' [-Werror=missing-prototypes] 730 | int ps3_r1x_hash_bit_lock(struct ps3_r1x_lock_mgr *mgr, struct ps3_cmd *cmd) | ^~~~~~~~~~~~~~~~~~~~~ >> drivers/scsi/linkdata/ps3stor/ps3_r1x_write_lock.c:988:6: error: no previous prototype for 'ps3_r1x_hash_bit_unlock' [-Werror=missing-prototypes] 988 | void ps3_r1x_hash_bit_unlock(struct ps3_r1x_lock_mgr *mgr, struct ps3_cmd *cmd) | ^~~~~~~~~~~~~~~~~~~~~~~ >> drivers/scsi/linkdata/ps3stor/ps3_r1x_write_lock.c:1173:5: error: no previous prototype for 'ps3_range_check_and_insert' [-Werror=missing-prototypes] 1173 | int ps3_range_check_and_insert(struct ps3_range_tree_root *range_root, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/scsi/linkdata/ps3stor/ps3_r1x_write_lock.c:1231:5: error: no previous prototype for 'ps3_r1x_hash_range_lock' [-Werror=missing-prototypes] 1231 | int ps3_r1x_hash_range_lock(struct ps3_r1x_lock_mgr *mgr, struct ps3_cmd *cmd) | ^~~~~~~~~~~~~~~~~~~~~~~ >> drivers/scsi/linkdata/ps3stor/ps3_r1x_write_lock.c:1312:6: error: no previous prototype for 'ps3_r1x_hash_range_unlock' [-Werror=missing-prototypes] 1312 | void ps3_r1x_hash_range_unlock(struct ps3_r1x_lock_mgr *mgr, | ^~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors -- >> drivers/scsi/linkdata/ps3stor/ps3_debug.c:883:5: error: no previous prototype for 'ps3_dump_dir_length' [-Werror=missing-prototypes] 883 | int ps3_dump_dir_length(const char *buf, size_t count) | ^~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors -- >> drivers/scsi/linkdata/ps3stor/ps3_module_para.c:609:14: error: no previous prototype for 'ps3_cli_ver_query' [-Werror=missing-prototypes] 609 | unsigned int ps3_cli_ver_query(void) | ^~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors -- >> drivers/scsi/linkdata/ps3stor/ps3_rb_tree.c:154:6: error: no previous prototype for 'rbtDelNodeDo' [-Werror=missing-prototypes] 154 | void rbtDelNodeDo(struct Ps3RbRoot *pRoot, struct Ps3RbNode *pNode) | ^~~~~~~~~~~~ cc1: all warnings being treated as errors -- >> drivers/scsi/linkdata/ps3stor/ps3_device_manager.c:1581:5: error: no previous prototype for 'ps3_scsi_private_init_pd' [-Werror=missing-prototypes] 1581 | int ps3_scsi_private_init_pd(struct scsi_device *sdev) | ^~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/scsi/linkdata/ps3stor/ps3_device_manager.c:1663:5: error: no previous prototype for 'ps3_scsi_private_init_vd' [-Werror=missing-prototypes] 1663 | int ps3_scsi_private_init_vd(struct scsi_device *sdev) | ^~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors .. vim +/ps3_pci_init +545 drivers/scsi/linkdata/ps3stor/./linux/ps3_base.c 544 > 545 int ps3_pci_init(struct pci_dev *pdev, struct ps3_instance *instance) 546 { 547 resource_size_t base_addr = 0; 548 int ret = PS3_SUCCESS; 549 550 ret = pci_enable_device_mem(pdev); 551 if (ret != PS3_SUCCESS) { 552 LOG_ERROR("hno:%u pci id[%u] pci enable failed\n", 553 PS3_HOST(instance), pdev->dev.id); 554 goto l_pci_enable_device_mem_failed; 555 } 556 557 pci_set_master(pdev); 558 559 instance->reg_bar = PS3_REGISTER_BAR_INDEX; 560 ret = (pci_resource_flags(pdev, instance->reg_bar) & IORESOURCE_MEM); 561 if (!ret) { 562 LOG_ERROR("hno:%u Bar %lu isnot IORESOURCE_MEM\n", 563 PS3_HOST(instance), instance->reg_bar); 564 goto l_bar_check_failed; 565 } 566 ret = pci_request_selected_regions(pdev, 1 << instance->reg_bar, 567 "PS3 pci regions"); 568 if (ret != PS3_SUCCESS) { 569 LOG_ERROR("hno:%u IO memory region busy\n", PS3_HOST(instance)); 570 goto l_pci_request_selected_regions_failed; 571 } 572 #if defined(PS3_SUPPORT_PCIE_REPORT) 573 pci_enable_pcie_error_reporting(pdev); 574 #endif 575 if (instance->ioc_adpter->reg_set) { 576 instance->reg_set = 577 (struct Ps3Fifo __iomem *)instance->ioc_adpter->reg_set( 578 pdev, instance->reg_bar); 579 } else { 580 instance->reg_set = (struct Ps3Fifo __iomem *)ioremap( 581 pci_resource_start(pdev, instance->reg_bar), 582 PS3_REGISTER_SET_SIZE); 583 } 584 if (instance->reg_set == NULL) { 585 LOG_ERROR("hno:%u ioremap failed\n", PS3_HOST(instance)); 586 goto l_ioremap_failed; 587 } else { 588 pci_set_drvdata(pdev, instance); 589 } 590 591 ps3_atomic_set(&instance->watchdog_reg_read_fail_count, 0); 592 LOG_INFO( 593 "reg_bar_idx = %lu, bar_base_paddr = 0x%llx, reg_set_vaddr = 0x%p\n", 594 instance->reg_bar, (unsigned long long)base_addr, instance->reg_set); 595 596 return PS3_SUCCESS; 597 l_ioremap_failed: 598 pci_release_selected_regions(instance->pdev, 1 << instance->reg_bar); 599 #if defined(PS3_SUPPORT_PCIE_REPORT) 600 pci_disable_pcie_error_reporting(pdev); 601 #endif 602 l_pci_request_selected_regions_failed: 603 pci_disable_device(instance->pdev); 604 l_bar_check_failed: 605 l_pci_enable_device_mem_failed: 606 return -PS3_FAILED; 607 } 608 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 2257/2257] mm/memblock.c:1409:20: warning: no previous prototype for 'memblock_alloc_range_nid_flags'
by kernel test robot 20 May '25

20 May '25
Hi Ma, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 07f584ce776b1da46ead9c90d16968739723d311 commit: 64018b291c1f49622c4b23b303364d760306d662 [2257/2257] mm/memblock: Introduce ability to alloc memory from specify memory region config: loongarch-randconfig-002-20250520 (https://download.01.org/0day-ci/archive/20250520/202505201944.3gmU2Dch-lkp@…) compiler: loongarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250520/202505201944.3gmU2Dch-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202505201944.3gmU2Dch-lkp@intel.com/ All warnings (new ones prefixed by >>): >> mm/memblock.c:1409:20: warning: no previous prototype for 'memblock_alloc_range_nid_flags' [-Wmissing-prototypes] 1409 | phys_addr_t __init memblock_alloc_range_nid_flags(phys_addr_t size, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- >> mm/memblock.c:1579: warning: expecting prototype for memblock_alloc_internal(). Prototype was for __memblock_alloc_internal() instead vim +/memblock_alloc_range_nid_flags +1409 mm/memblock.c 1386 1387 /** 1388 * memblock_alloc_range_nid_flags - allocate boot memory block with specify flag 1389 * @size: size of memory block to be allocated in bytes 1390 * @align: alignment of the region and block's size 1391 * @start: the lower bound of the memory region to allocate (phys address) 1392 * @end: the upper bound of the memory region to allocate (phys address) 1393 * @nid: nid of the free area to find, %NUMA_NO_NODE for any node 1394 * @exact_nid: control the allocation fall back to other nodes 1395 * @flags: alloc memory from specify memblock flag 1396 * 1397 * The allocation is performed from memory region limited by 1398 * memblock.current_limit if @end == %MEMBLOCK_ALLOC_ACCESSIBLE. 1399 * 1400 * If the specified node can not hold the requested memory and @exact_nid 1401 * is false, the allocation falls back to any node in the system. 1402 * 1403 * In addition, function sets the min_count to 0 using kmemleak_alloc_phys for 1404 * allocated boot memory block, so that it is never reported as leaks. 1405 * 1406 * Return: 1407 * Physical address of allocated memory block on success, %0 on failure. 1408 */ > 1409 phys_addr_t __init memblock_alloc_range_nid_flags(phys_addr_t size, 1410 phys_addr_t align, phys_addr_t start, 1411 phys_addr_t end, int nid, 1412 bool exact_nid, 1413 enum memblock_flags flags) 1414 { 1415 phys_addr_t found; 1416 1417 if (WARN_ONCE(nid == MAX_NUMNODES, "Usage of MAX_NUMNODES is deprecated. Use NUMA_NO_NODE instead\n")) 1418 nid = NUMA_NO_NODE; 1419 1420 if (!align) { 1421 /* Can't use WARNs this early in boot on powerpc */ 1422 dump_stack(); 1423 align = SMP_CACHE_BYTES; 1424 } 1425 1426 again: 1427 found = memblock_find_in_range_node(size, align, start, end, nid, 1428 flags); 1429 if (found && !memblock_reserve(found, size)) 1430 goto done; 1431 1432 if (nid != NUMA_NO_NODE && !exact_nid) { 1433 found = memblock_find_in_range_node(size, align, start, 1434 end, NUMA_NO_NODE, 1435 flags); 1436 if (found && !memblock_reserve(found, size)) 1437 goto done; 1438 } 1439 1440 if (flags & MEMBLOCK_MIRROR) { 1441 flags &= ~MEMBLOCK_MIRROR; 1442 pr_warn_ratelimited("Could not allocate %pap bytes of mirrored memory\n", 1443 &size); 1444 goto again; 1445 } 1446 1447 return 0; 1448 1449 done: 1450 /* 1451 * Skip kmemleak for those places like kasan_init() and 1452 * early_pgtable_alloc() due to high volume. 1453 */ 1454 if (end != MEMBLOCK_ALLOC_NOLEAKTRACE) 1455 /* 1456 * Memblock allocated blocks are never reported as 1457 * leaks. This is because many of these blocks are 1458 * only referred via the physical address which is 1459 * not looked up by kmemleak. 1460 */ 1461 kmemleak_alloc_phys(found, size, 0); 1462 1463 /* 1464 * Some Virtual Machine platforms, such as Intel TDX or AMD SEV-SNP, 1465 * require memory to be accepted before it can be used by the 1466 * guest. 1467 * 1468 * Accept the memory of the allocated buffer. 1469 */ 1470 accept_memory(found, found + size); 1471 1472 return found; 1473 } 1474 1475 /** 1476 * memblock_alloc_range_nid - allocate boot memory block 1477 * @size: size of memory block to be allocated in bytes 1478 * @align: alignment of the region and block's size 1479 * @start: the lower bound of the memory region to allocate (phys address) 1480 * @end: the upper bound of the memory region to allocate (phys address) 1481 * @nid: nid of the free area to find, %NUMA_NO_NODE for any node 1482 * @exact_nid: control the allocation fall back to other nodes 1483 * 1484 * The allocation is performed from memory region limited by 1485 * memblock.current_limit if @end == %MEMBLOCK_ALLOC_ACCESSIBLE. 1486 * 1487 * If the specified node can not hold the requested memory and @exact_nid 1488 * is false, the allocation falls back to any node in the system. 1489 * 1490 * For systems with memory mirroring, the allocation is attempted first 1491 * from the regions with mirroring enabled and then retried from any 1492 * memory region. 1493 * 1494 * In addition, function using kmemleak_alloc_phys for allocated boot 1495 * memory block, it is never reported as leaks. 1496 * 1497 * Return: 1498 * Physical address of allocated memory block on success, %0 on failure. 1499 */ 1500 phys_addr_t __init memblock_alloc_range_nid(phys_addr_t size, 1501 phys_addr_t align, phys_addr_t start, 1502 phys_addr_t end, int nid, 1503 bool exact_nid) 1504 { 1505 return memblock_alloc_range_nid_flags(size, align, start, end, nid, 1506 exact_nid, 1507 choose_memblock_flags()); 1508 } 1509 1510 /** 1511 * memblock_phys_alloc_range - allocate a memory block inside specified range 1512 * @size: size of memory block to be allocated in bytes 1513 * @align: alignment of the region and block's size 1514 * @start: the lower bound of the memory region to allocate (physical address) 1515 * @end: the upper bound of the memory region to allocate (physical address) 1516 * 1517 * Allocate @size bytes in the between @start and @end. 1518 * 1519 * Return: physical address of the allocated memory block on success, 1520 * %0 on failure. 1521 */ 1522 phys_addr_t __init memblock_phys_alloc_range(phys_addr_t size, 1523 phys_addr_t align, 1524 phys_addr_t start, 1525 phys_addr_t end) 1526 { 1527 memblock_dbg("%s: %llu bytes align=0x%llx from=%pa max_addr=%pa %pS\n", 1528 __func__, (u64)size, (u64)align, &start, &end, 1529 (void *)_RET_IP_); 1530 return memblock_alloc_range_nid(size, align, start, end, NUMA_NO_NODE, 1531 false); 1532 } 1533 1534 /** 1535 * memblock_phys_alloc_try_nid - allocate a memory block from specified NUMA node 1536 * @size: size of memory block to be allocated in bytes 1537 * @align: alignment of the region and block's size 1538 * @nid: nid of the free area to find, %NUMA_NO_NODE for any node 1539 * 1540 * Allocates memory block from the specified NUMA node. If the node 1541 * has no available memory, attempts to allocated from any node in the 1542 * system. 1543 * 1544 * Return: physical address of the allocated memory block on success, 1545 * %0 on failure. 1546 */ 1547 phys_addr_t __init memblock_phys_alloc_try_nid(phys_addr_t size, phys_addr_t align, int nid) 1548 { 1549 return memblock_alloc_range_nid(size, align, 0, 1550 MEMBLOCK_ALLOC_ACCESSIBLE, nid, false); 1551 } 1552 1553 /** 1554 * memblock_alloc_internal - allocate boot memory block 1555 * @size: size of memory block to be allocated in bytes 1556 * @align: alignment of the region and block's size 1557 * @min_addr: the lower bound of the memory region to allocate (phys address) 1558 * @max_addr: the upper bound of the memory region to allocate (phys address) 1559 * @nid: nid of the free area to find, %NUMA_NO_NODE for any node 1560 * @exact_nid: control the allocation fall back to other nodes 1561 * @flags: alloc memory from specify memblock flag 1562 * 1563 * Allocates memory block using memblock_alloc_range_nid() and 1564 * converts the returned physical address to virtual. 1565 * 1566 * The @min_addr limit is dropped if it can not be satisfied and the allocation 1567 * will fall back to memory below @min_addr. Other constraints, such 1568 * as node and mirrored memory will be handled again in 1569 * memblock_alloc_range_nid(). 1570 * 1571 * Return: 1572 * Virtual address of allocated memory block on success, NULL on failure. 1573 */ 1574 static void * __init __memblock_alloc_internal( 1575 phys_addr_t size, phys_addr_t align, 1576 phys_addr_t min_addr, phys_addr_t max_addr, 1577 int nid, bool exact_nid, 1578 enum memblock_flags flags) > 1579 { 1580 phys_addr_t alloc; 1581 1582 /* 1583 * Detect any accidental use of these APIs after slab is ready, as at 1584 * this moment memblock may be deinitialized already and its 1585 * internal data may be destroyed (after execution of memblock_free_all) 1586 */ 1587 if (WARN_ON_ONCE(slab_is_available())) 1588 return kzalloc_node(size, GFP_NOWAIT, nid); 1589 1590 if (max_addr > memblock.current_limit) 1591 max_addr = memblock.current_limit; 1592 1593 alloc = memblock_alloc_range_nid_flags(size, align, min_addr, max_addr, nid, 1594 exact_nid, flags); 1595 1596 /* retry allocation without lower limit */ 1597 if (!alloc && min_addr) 1598 alloc = memblock_alloc_range_nid_flags(size, align, 0, max_addr, nid, 1599 exact_nid, flags); 1600 1601 if (!alloc) 1602 return NULL; 1603 1604 return phys_to_virt(alloc); 1605 } 1606 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1646/1646] mm/hugetlb.c:1370:6: warning: no previous prototype for 'free_huge_page_to_dhugetlb_pool'
by kernel test robot 20 May '25

20 May '25
Hi Liu, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 2eb609d2f89b2d85d89cb018c3f97050989807e2 commit: 0bc0d0d57edacd59ebe38d05ad9c4b2bc185aa51 [1646/1646] dhugetlb: backport dynamic hugetlb feature config: arm64-randconfig-001-20250520 (https://download.01.org/0day-ci/archive/20250520/202505201910.3QGTFYPj-lkp@…) compiler: aarch64-linux-gcc (GCC) 13.3.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250520/202505201910.3QGTFYPj-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202505201910.3QGTFYPj-lkp@intel.com/ All warnings (new ones prefixed by >>): >> mm/hugetlb.c:1370:6: warning: no previous prototype for 'free_huge_page_to_dhugetlb_pool' [-Wmissing-prototypes] 1370 | void free_huge_page_to_dhugetlb_pool(struct page *page, bool restore_reserve) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vim +/free_huge_page_to_dhugetlb_pool +1370 mm/hugetlb.c 1324 1325 #ifdef CONFIG_DYNAMIC_HUGETLB 1326 static void free_huge_page_to_dhugetlb_pool(struct page *page, 1327 bool restore_reserve) 1328 { 1329 struct hstate *h = page_hstate(page); 1330 struct dhugetlb_pool *hpool; 1331 1332 hpool = get_dhugetlb_pool_from_dhugetlb_pagelist(page); 1333 if (unlikely(!hpool)) { 1334 pr_err("dhugetlb: free error: get hpool failed\n"); 1335 return; 1336 } 1337 1338 spin_lock(&hpool->lock); 1339 ClearPagePool(page); 1340 set_compound_page_dtor(page, NULL_COMPOUND_DTOR); 1341 if (!hstate_is_gigantic(h)) { 1342 list_add(&page->lru, &hpool->dhugetlb_2M_freelists); 1343 hpool->free_reserved_2M++; 1344 hpool->used_2M--; 1345 if (restore_reserve) { 1346 hpool->mmap_reserved_2M++; 1347 trace_dhugetlb_acct_memory(hpool, 1348 hpool->mmap_reserved_2M, 1349 DHUGETLB_RESV_2M); 1350 } 1351 trace_dhugetlb_alloc_free(hpool, page, hpool->free_reserved_2M, 1352 DHUGETLB_FREE_2M); 1353 } else { 1354 list_add(&page->lru, &hpool->dhugetlb_1G_freelists); 1355 hpool->free_reserved_1G++; 1356 hpool->used_1G--; 1357 if (restore_reserve) { 1358 hpool->mmap_reserved_1G++; 1359 trace_dhugetlb_acct_memory(hpool, 1360 hpool->mmap_reserved_1G, 1361 DHUGETLB_RESV_1G); 1362 } 1363 trace_dhugetlb_alloc_free(hpool, page, hpool->free_reserved_1G, 1364 DHUGETLB_FREE_1G); 1365 } 1366 spin_unlock(&hpool->lock); 1367 dhugetlb_pool_put(hpool); 1368 } 1369 #else > 1370 void free_huge_page_to_dhugetlb_pool(struct page *page, bool restore_reserve) 1371 { 1372 } 1373 #endif 1374 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 2257/2257] mm/mempolicy.c:1115:32: warning: variable 'vma' set but not used
by kernel test robot 20 May '25

20 May '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: e69c6375f883badcc9ec4c9e9ed85660ac3fb1bf commit: dba69db9a5fc7c2c9c0cda0f32bb3b5f3d73ef93 [2257/2257] mm/damon/vaddr: Add demotion interface for migrating cold pages to target nodemask config: x86_64-buildonly-randconfig-002-20250520 (https://download.01.org/0day-ci/archive/20250520/202505201856.VGaOEUgd-lkp@…) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250520/202505201856.VGaOEUgd-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202505201856.VGaOEUgd-lkp@intel.com/ All warnings (new ones prefixed by >>): mm/mempolicy.c: In function 'migrate_area_to_node': >> mm/mempolicy.c:1115:32: warning: variable 'vma' set but not used [-Wunused-but-set-variable] 1115 | struct vm_area_struct *vma; | ^~~ Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for PTP_1588_CLOCK Depends on [n]: NET [=y] && POSIX_TIMERS [=n] Selected by [y]: - SXE [=y] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_LINKDATA [=y] && (X86 [=y] || ARM64) && PCI [=y] - SXE_VF [=y] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_LINKDATA [=y] && (X86 [=y] || ARM64) && PCI [=y] vim +/vma +1115 mm/mempolicy.c 1106 1107 /* 1108 * Migrate area pages from one node to a target node. 1109 * Returns error or the number of pages not migrated. 1110 */ 1111 static int migrate_area_to_node(struct mm_struct *mm, int source, int dest, 1112 unsigned long start, unsigned long end, int flags) 1113 { 1114 nodemask_t nmask; > 1115 struct vm_area_struct *vma; 1116 LIST_HEAD(pagelist); 1117 int err = 0; 1118 struct migration_target_control mtc = { 1119 .nid = dest, 1120 .gfp_mask = GFP_HIGHUSER_MOVABLE | __GFP_THISNODE, 1121 }; 1122 1123 nodes_clear(nmask); 1124 node_set(source, nmask); 1125 1126 /* 1127 * This does not "check" the range but isolates all pages that 1128 * need migration. Between passing in the full user address 1129 * space range and MPOL_MF_DISCONTIG_OK, this call can not fail. 1130 */ 1131 vma = find_vma(mm, 0); 1132 VM_BUG_ON(!(flags & (MPOL_MF_MOVE | MPOL_MF_MOVE_ALL))); 1133 queue_pages_range(mm, start, end, &nmask, 1134 flags | MPOL_MF_DISCONTIG_OK, &pagelist, false); 1135 1136 if (!list_empty(&pagelist)) { 1137 err = migrate_pages(&pagelist, alloc_migration_target, NULL, 1138 (unsigned long)&mtc, MIGRATE_SYNC, MR_DAMON_DEMOTION, NULL); 1139 if (err) 1140 putback_movable_pages(&pagelist); 1141 } 1142 1143 return err; 1144 } 1145 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 2257/2257] drivers/crypto/sedriver/wst_se_echip_driver.c:95:25: warning: no previous prototype for 'se_get_dma_buf'
by kernel test robot 20 May '25

20 May '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 07f584ce776b1da46ead9c90d16968739723d311 commit: 3fb87845837f13b19d7b20349801e75f2e303293 [2257/2257] crypto: loongson: add wst se chip support config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20250520/202505201757.qoTbv6a9-lkp@…) compiler: loongarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250520/202505201757.qoTbv6a9-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202505201757.qoTbv6a9-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/crypto/sedriver/wst_se_echip_driver.c:95:25: warning: no previous prototype for 'se_get_dma_buf' [-Wmissing-prototypes] 95 | struct tag_dma_buf_ctl *se_get_dma_buf(int ikernel) | ^~~~~~~~~~~~~~ >> drivers/crypto/sedriver/wst_se_echip_driver.c:114:5: warning: no previous prototype for 'se_free_dma_buf' [-Wmissing-prototypes] 114 | int se_free_dma_buf(struct tag_dma_buf_ctl *pdmabufctl) | ^~~~~~~~~~~~~~~ >> drivers/crypto/sedriver/wst_se_echip_driver.c:150:5: warning: no previous prototype for 'se_printk_hex' [-Wmissing-prototypes] 150 | int se_printk_hex(unsigned char *buff, int length) | ^~~~~~~~~~~~~ >> drivers/crypto/sedriver/wst_se_echip_driver.c:1082:9: warning: no previous prototype for 'se_kernelwrite' [-Wmissing-prototypes] 1082 | ssize_t se_kernelwrite(unsigned char *pInPtr, unsigned short usInlen, | ^~~~~~~~~~~~~~ >> drivers/crypto/sedriver/wst_se_echip_driver.c:1175:5: warning: no previous prototype for 'se_chip_load' [-Wmissing-prototypes] 1175 | int se_chip_load(void) | ^~~~~~~~~~~~ >> drivers/crypto/sedriver/wst_se_echip_driver.c:1272:6: warning: no previous prototype for 'se_chip_unload' [-Wmissing-prototypes] 1272 | void se_chip_unload(void) | ^~~~~~~~~~~~~~ vim +/se_get_dma_buf +95 drivers/crypto/sedriver/wst_se_echip_driver.c 94 > 95 struct tag_dma_buf_ctl *se_get_dma_buf(int ikernel) 96 { 97 struct tag_dma_buf_ctl *pbufctl = NULL; 98 unsigned long ultimeout = 0; 99 100 ultimeout = jiffies + 20 * HZ; 101 while (1) { 102 spin_lock(&g_getdmabuflock); 103 pbufctl = (struct tag_dma_buf_ctl *)wst_Popfront_Que( 104 &g_DmaBQueueContainer); 105 spin_unlock(&g_getdmabuflock); 106 if (pbufctl) 107 return pbufctl; 108 if (down_timeout(&g_dmabufsem, ultimeout)) 109 return NULL; 110 } 111 return pbufctl; 112 } 113 > 114 int se_free_dma_buf(struct tag_dma_buf_ctl *pdmabufctl) 115 { 116 spin_lock(&g_getdmabuflock); 117 wst_Pushback_Que(&g_DmaBQueueContainer, pdmabufctl); 118 spin_unlock(&g_getdmabuflock); 119 if (g_dmabufsem.count <= 0) 120 up(&g_dmabufsem); 121 122 return 0; 123 } 124 125 static unsigned long bytes_align(struct device *pdev, unsigned long ulVirAddr) 126 { 127 unsigned char diff; 128 unsigned long ulPhyAddr = (unsigned long)__pa((void *)ulVirAddr); 129 130 if ((ulPhyAddr & 0x000000000000003f) == 0) 131 return ulVirAddr; 132 diff = ((long)ulPhyAddr & (~(0x000000000000003f))) + 64 - ulPhyAddr; 133 ulVirAddr += diff; 134 135 return ulVirAddr; 136 } 137 138 static unsigned long descri_bytes_align(unsigned long ulVirAddr) 139 { 140 unsigned char diff; 141 unsigned long ulPhyAddr = ulVirAddr; 142 143 if ((ulPhyAddr & (~0x00000000ffffffe0)) == 0) 144 return ulVirAddr; 145 diff = ((long)ulPhyAddr & 0x00000000ffffffe0) + 32 - ulPhyAddr; 146 ulVirAddr += diff; 147 return ulVirAddr; 148 } 149 > 150 int se_printk_hex(unsigned char *buff, int length) 151 { 152 unsigned char *string_tmp = buff; 153 int i; 154 int count = 0; 155 156 for (i = 0; i < length; i++, count++) { 157 if (count < 16) 158 pr_info("%02x ", string_tmp[i]); 159 else { 160 count = 0; 161 pr_info("\n%02x ", string_tmp[i]); 162 continue; 163 } 164 } 165 pr_info("\n"); 166 return 0; 167 } 168 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1646/1646] mm/memory_hotplug.c:482:23: warning: variable 'start_pfn' set but not used
by kernel test robot 20 May '25

20 May '25
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 2eb609d2f89b2d85d89cb018c3f97050989807e2 commit: 8de9a7ef5533b50d0054c06cb04bd266ecac17b7 [1646/1646] mm/memory_hotplug: shrink zones when offlining memory config: arm64-randconfig-001-20250520 (https://download.01.org/0day-ci/archive/20250520/202505201731.rOzzhiIH-lkp@…) compiler: aarch64-linux-gcc (GCC) 13.3.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250520/202505201731.rOzzhiIH-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202505201731.rOzzhiIH-lkp@intel.com/ All warnings (new ones prefixed by >>): mm/memory_hotplug.c: In function '__remove_section': >> mm/memory_hotplug.c:482:23: warning: variable 'start_pfn' set but not used [-Wunused-but-set-variable] 482 | unsigned long start_pfn; | ^~~~~~~~~ vim +/start_pfn +482 mm/memory_hotplug.c 815121d2b5cd56 Yasuaki Ishimatsu 2013-02-22 478 8de9a7ef5533b5 David Hildenbrand 2020-09-22 479 static void __remove_section(struct mem_section *ms, unsigned long map_offset, b9f9a54ea6ea41 David Hildenbrand 2020-09-22 480 struct vmem_altmap *altmap) ea01ea937dcae2 Badari Pulavarty 2008-04-28 481 { 815121d2b5cd56 Yasuaki Ishimatsu 2013-02-22 @482 unsigned long start_pfn; 815121d2b5cd56 Yasuaki Ishimatsu 2013-02-22 483 int scn_nr; ea01ea937dcae2 Badari Pulavarty 2008-04-28 484 b9f9a54ea6ea41 David Hildenbrand 2020-09-22 485 if (WARN_ON_ONCE(!valid_section(ms))) b9f9a54ea6ea41 David Hildenbrand 2020-09-22 486 return; ea01ea937dcae2 Badari Pulavarty 2008-04-28 487 815121d2b5cd56 Yasuaki Ishimatsu 2013-02-22 488 scn_nr = __section_nr(ms); 1dd2bfc86818dd YASUAKI ISHIMATSU 2017-10-03 489 start_pfn = section_nr_to_pfn((unsigned long)scn_nr); 815121d2b5cd56 Yasuaki Ishimatsu 2013-02-22 490 457dd3c8002ca0 David Hildenbrand 2020-09-22 491 sparse_remove_one_section(ms, map_offset, altmap); ea01ea937dcae2 Badari Pulavarty 2008-04-28 492 } ea01ea937dcae2 Badari Pulavarty 2008-04-28 493 :::::: The code at line 482 was first introduced by commit :::::: 815121d2b5cd56f1757d4468dc3abadd06a0ed6b memory_hotplug: clear zone when removing the memory :::::: TO: Yasuaki Ishimatsu <isimatu.yasuaki(a)jp.fujitsu.com> :::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 2257/2257] mm/madvise.c:297:6: warning: no previous prototype for 'force_swapin_vma'
by kernel test robot 20 May '25

20 May '25
Hi Liu, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 289de29f4f837038aa79e765e64ddc1d410fe5fd commit: 92a0eb9bde6c03412b39f9f3d20968c091ea3b46 [2257/2257] memcg: introduce per-memcg swapin interface config: loongarch-randconfig-002-20250520 (https://download.01.org/0day-ci/archive/20250520/202505201708.6dvo6U58-lkp@…) compiler: loongarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250520/202505201708.6dvo6U58-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202505201708.6dvo6U58-lkp@intel.com/ All warnings (new ones prefixed by >>): >> mm/madvise.c:297:6: warning: no previous prototype for 'force_swapin_vma' [-Wmissing-prototypes] 297 | void force_swapin_vma(struct vm_area_struct *vma) | ^~~~~~~~~~~~~~~~ vim +/force_swapin_vma +297 mm/madvise.c 280 281 #ifdef CONFIG_MEMCG_SWAP_QOS 282 void force_swapin_vma(struct vm_area_struct *vma) 283 { 284 struct file *file = vma->vm_file; 285 286 if (!can_madv_lru_vma(vma)) 287 return; 288 289 if (!file) { 290 walk_page_vma(vma, &swapin_walk_ops, vma); 291 lru_add_drain(); 292 } else if (shmem_mapping(file->f_mapping)) 293 shmem_swapin_range(vma, vma->vm_start, 294 vma->vm_end, file->f_mapping); 295 } 296 #else > 297 void force_swapin_vma(struct vm_area_struct *vma) 298 { 299 } 300 #endif 301 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 2258/2258] versioncheck: ./drivers/crypto/sedriver/wst_se_common_type.h: 19 linux/version.h not needed.
by kernel test robot 20 May '25

20 May '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 289de29f4f837038aa79e765e64ddc1d410fe5fd commit: 3fb87845837f13b19d7b20349801e75f2e303293 [2258/2258] crypto: loongson: add wst se chip support reproduce: (https://download.01.org/0day-ci/archive/20250520/202505201722.VJAhefze-lkp@…) 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(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202505201722.VJAhefze-lkp@intel.com/ versioncheck warnings: (new ones prefixed by >>) INFO PATH=/opt/cross/rustc-1.73.0-bindgen-0.65.1/cargo/bin:/opt/cross/clang-20/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /usr/bin/timeout -k 100 3h /usr/bin/make KCFLAGS= -Wno-error=return-type -Wreturn-type -funsigned-char -Wundef W=1 --keep-going LLVM=1 -j16 ARCH=x86_64 versioncheck find ./* \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS -o -name .pc -o -name .hg -o -name .git \) -prune -o \ -name '*.[hcS]' -type f -print | sort \ | xargs perl -w ./scripts/checkversion.pl ./drivers/accessibility/speakup/genmap.c: 13 linux/version.h not needed. ./drivers/accessibility/speakup/makemapdata.c: 13 linux/version.h not needed. ./drivers/char/ipmi/ipmi_si_ls2k500.c: 19 linux/version.h not needed. ./drivers/crypto/ccp/hygon/hct.c: 6 linux/version.h not needed. ./drivers/crypto/ccp/hygon/tdm-dev.h: 29 linux/version.h not needed. ./drivers/crypto/montage/tsse/tsse_vuart.c: 21 linux/version.h not needed. >> ./drivers/crypto/sedriver/wst_se_common_type.h: 19 linux/version.h not needed. ./drivers/gpu/drm/phytium/phytium_gem.c: 9 linux/version.h not needed. ./drivers/i2c/busses/i2c-zhaoxin.c: 18 linux/version.h not needed. ./drivers/net/ethernet/3snic/sssnic/include/kernel/sss_linux_kernel.h: 13 linux/version.h not needed. ./drivers/net/ethernet/huawei/bma/edma_drv/bma_include.h: 32 linux/version.h not needed. ./drivers/net/ethernet/huawei/bma/edma_drv/bma_pci.c: 17 linux/version.h not needed. ./drivers/net/ethernet/huawei/bma/kbox_drv/kbox_include.h: 20 linux/version.h not needed. ./drivers/net/ethernet/huawei/bma/kbox_drv/kbox_main.c: 22 linux/version.h not needed. ./drivers/net/ethernet/huawei/bma/kbox_drv/kbox_mce.c: 16 linux/version.h not needed. ./drivers/net/ethernet/huawei/bma/kbox_drv/kbox_ram_op.c: 16 linux/version.h not needed. ./drivers/net/ethernet/huawei/hinic/ossl_knl.h: 22 linux/version.h not needed. ./drivers/net/ethernet/huawei/hinic3/bond/hinic3_bond.c: 12 linux/version.h not needed. ./drivers/net/ethernet/huawei/hinic3/ossl_knl_linux.h: 12 linux/version.h not needed. ./drivers/net/ethernet/linkdata/sxe/base/compat/sxe_compat.h: 16 linux/version.h not needed. ./drivers/net/ethernet/linkdata/sxevf/base/compat/sxe_compat.h: 16 linux/version.h not needed. ./drivers/net/ethernet/mucse/rnpm/rnpm_common.h: 7 linux/version.h not needed. ./drivers/net/ethernet/yunsilicon/xsc/common/xsc_core.h: 26 linux/version.h not needed. ./drivers/scsi/hisi_raid/hiraid_main.c: 9 linux/version.h not needed. ./drivers/scsi/linkdata/ps3stor/linux/ps3_base.c: 11 linux/version.h not needed. ./drivers/scsi/linkdata/ps3stor/linux/ps3_cli.c: 14 linux/version.h not needed. ./drivers/scsi/linkdata/ps3stor/linux/ps3_driver_log.c: 3 linux/version.h not needed. ./drivers/scsi/linkdata/ps3stor/ps3_device_manager.h: 9 linux/version.h not needed. ./drivers/scsi/linkdata/ps3stor/ps3_device_manager_sas.h: 6 linux/version.h not needed. ./drivers/scsi/linkdata/ps3stor/ps3_qos.c: 6 linux/version.h not needed. ./drivers/scsi/linkdata/ps3stor/ps3_rb_tree.h: 7 linux/version.h not needed. ./drivers/scsi/linkdata/ps3stor/ps3_sas_transport.h: 9 linux/version.h not needed. ./drivers/scsi/linkdata/ps3stor/ps3_scsi_cmd_err.c: 9 linux/version.h not needed. ./drivers/scsi/sssraid/sssraid_fw.c: 6 linux/version.h not needed. ./drivers/scsi/sssraid/sssraid_os.c: 6 linux/version.h not needed. ./drivers/staging/media/atomisp/include/linux/atomisp.h: 23 linux/version.h not needed. ./fs/proc/etmem_scan.c: 13 linux/version.h not needed. ./samples/bpf/spintest.bpf.c: 8 linux/version.h not needed. ./samples/trace_events/trace_custom_sched.c: 11 linux/version.h not needed. ./sound/soc/codecs/cs42l42.c: 14 linux/version.h not needed. ./tools/lib/bpf/bpf_helpers.h: 402: need linux/version.h ./tools/testing/selftests/bpf/progs/dev_cgroup.c: 9 linux/version.h not needed. ./tools/testing/selftests/bpf/progs/netcnt_prog.c: 3 linux/version.h not needed. ./tools/testing/selftests/bpf/progs/test_map_lock.c: 4 linux/version.h not needed. ./tools/testing/selftests/bpf/progs/test_send_signal_kern.c: 4 linux/version.h not needed. ./tools/testing/selftests/bpf/progs/test_spin_lock.c: 4 linux/version.h not needed. ./tools/testing/selftests/bpf/progs/test_tcp_estats.c: 37 linux/version.h not needed. ./tools/testing/selftests/wireguard/qemu/init.c: 27 linux/version.h not needed. -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • ...
  • 1828
  • Older →

HyperKitty Powered by HyperKitty