From: kernel test robot <lkp@intel.com>
To: Yang Shi <yang@os.amperecomputing.com>,
ryan.roberts@arm.com, will@kernel.org, catalin.marinas@arm.com,
Miko.Lenczewski@arm.com, scott@os.amperecomputing.com,
cl@gentwo.org
Cc: oe-kbuild-all@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [v3 PATCH 4/6] arm64: mm: support large block mapping when rodata=full
Date: Sat, 8 Mar 2025 09:53:05 +0800 [thread overview]
Message-ID: <202503080930.7ZetfmFz-lkp@intel.com> (raw)
In-Reply-To: <20250304222018.615808-5-yang@os.amperecomputing.com>
Hi Yang,
kernel test robot noticed the following build warnings:
[auto build test WARNING on arm64/for-next/core]
[also build test WARNING on linus/master v6.14-rc5 next-20250307]
[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/Yang-Shi/arm64-Add-BBM-Level-2-cpu-feature/20250305-062252
base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
patch link: https://lore.kernel.org/r/20250304222018.615808-5-yang%40os.amperecomputing.com
patch subject: [v3 PATCH 4/6] arm64: mm: support large block mapping when rodata=full
config: arm64-randconfig-002-20250308 (https://download.01.org/0day-ci/archive/20250308/202503080930.7ZetfmFz-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250308/202503080930.7ZetfmFz-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/202503080930.7ZetfmFz-lkp@intel.com/
All warnings (new ones prefixed by >>):
arch/arm64/mm/mmu.c: In function 'alloc_init_pud':
>> arch/arm64/mm/mmu.c:511:35: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
511 | pud_clear_fixmap();
| ^
arch/arm64/mm/mmu.c: In function 'alloc_init_p4d':
arch/arm64/mm/mmu.c:570:35: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
570 | p4d_clear_fixmap();
| ^
vim +/if +511 arch/arm64/mm/mmu.c
d27cfa1fc823d3 Ard Biesheuvel 2017-03-09 428
2451145c9a60e0 Yang Shi 2025-03-04 429 static int alloc_init_pud(p4d_t *p4dp, unsigned long addr, unsigned long end,
da141706aea52c Laura Abbott 2015-01-21 430 phys_addr_t phys, pgprot_t prot,
90292aca9854a2 Yu Zhao 2019-03-11 431 phys_addr_t (*pgtable_alloc)(int),
c0951366d4b7e0 Ard Biesheuvel 2017-03-09 432 int flags)
c1cc1552616d0f Catalin Marinas 2012-03-05 433 {
c1cc1552616d0f Catalin Marinas 2012-03-05 434 unsigned long next;
2451145c9a60e0 Yang Shi 2025-03-04 435 int ret = 0;
e9f6376858b979 Mike Rapoport 2020-06-04 436 p4d_t p4d = READ_ONCE(*p4dp);
6ed8a3a094b43a Ard Biesheuvel 2024-02-14 437 pud_t *pudp;
6fad683b9a5c21 Yang Shi 2025-03-04 438 bool split = flags & SPLIT_MAPPINGS;
6fad683b9a5c21 Yang Shi 2025-03-04 439
6fad683b9a5c21 Yang Shi 2025-03-04 440 if (split) {
6fad683b9a5c21 Yang Shi 2025-03-04 441 BUG_ON(p4d_none(p4d));
6fad683b9a5c21 Yang Shi 2025-03-04 442 pudp = pud_offset(p4dp, addr);
6fad683b9a5c21 Yang Shi 2025-03-04 443 goto split_pgtable;
6fad683b9a5c21 Yang Shi 2025-03-04 444 }
c1cc1552616d0f Catalin Marinas 2012-03-05 445
e9f6376858b979 Mike Rapoport 2020-06-04 446 if (p4d_none(p4d)) {
efe72541355d4d Yicong Yang 2024-11-02 447 p4dval_t p4dval = P4D_TYPE_TABLE | P4D_TABLE_UXN | P4D_TABLE_AF;
132233a759580f Laura Abbott 2016-02-05 448 phys_addr_t pud_phys;
87143f404f338d Ard Biesheuvel 2021-03-10 449
87143f404f338d Ard Biesheuvel 2021-03-10 450 if (flags & NO_EXEC_MAPPINGS)
87143f404f338d Ard Biesheuvel 2021-03-10 451 p4dval |= P4D_TABLE_PXN;
132233a759580f Laura Abbott 2016-02-05 452 BUG_ON(!pgtable_alloc);
90292aca9854a2 Yu Zhao 2019-03-11 453 pud_phys = pgtable_alloc(PUD_SHIFT);
2451145c9a60e0 Yang Shi 2025-03-04 454 if (!pud_phys)
2451145c9a60e0 Yang Shi 2025-03-04 455 return -ENOMEM;
0e9df1c905d829 Ryan Roberts 2024-04-12 456 pudp = pud_set_fixmap(pud_phys);
0e9df1c905d829 Ryan Roberts 2024-04-12 457 init_clear_pgtable(pudp);
0e9df1c905d829 Ryan Roberts 2024-04-12 458 pudp += pud_index(addr);
87143f404f338d Ard Biesheuvel 2021-03-10 459 __p4d_populate(p4dp, pud_phys, p4dval);
0e9df1c905d829 Ryan Roberts 2024-04-12 460 } else {
e9f6376858b979 Mike Rapoport 2020-06-04 461 BUG_ON(p4d_bad(p4d));
e9f6376858b979 Mike Rapoport 2020-06-04 462 pudp = pud_set_fixmap_offset(p4dp, addr);
0e9df1c905d829 Ryan Roberts 2024-04-12 463 }
0e9df1c905d829 Ryan Roberts 2024-04-12 464
6fad683b9a5c21 Yang Shi 2025-03-04 465 split_pgtable:
c1cc1552616d0f Catalin Marinas 2012-03-05 466 do {
20a004e7b017cc Will Deacon 2018-02-15 467 pud_t old_pud = READ_ONCE(*pudp);
e98216b52176ba Ard Biesheuvel 2016-10-21 468
c1cc1552616d0f Catalin Marinas 2012-03-05 469 next = pud_addr_end(addr, end);
206a2a73a62d37 Steve Capper 2014-05-06 470
6fad683b9a5c21 Yang Shi 2025-03-04 471 if (split) {
6fad683b9a5c21 Yang Shi 2025-03-04 472 ret = split_pud(pudp, old_pud, pgtable_alloc);
6fad683b9a5c21 Yang Shi 2025-03-04 473 if (ret)
6fad683b9a5c21 Yang Shi 2025-03-04 474 break;
6fad683b9a5c21 Yang Shi 2025-03-04 475
6fad683b9a5c21 Yang Shi 2025-03-04 476 ret = alloc_init_cont_pmd(pudp, addr, next, phys, prot,
6fad683b9a5c21 Yang Shi 2025-03-04 477 pgtable_alloc, flags);
6fad683b9a5c21 Yang Shi 2025-03-04 478 if (ret)
6fad683b9a5c21 Yang Shi 2025-03-04 479 break;
6fad683b9a5c21 Yang Shi 2025-03-04 480
6fad683b9a5c21 Yang Shi 2025-03-04 481 continue;
6fad683b9a5c21 Yang Shi 2025-03-04 482 }
6fad683b9a5c21 Yang Shi 2025-03-04 483
206a2a73a62d37 Steve Capper 2014-05-06 484 /*
206a2a73a62d37 Steve Capper 2014-05-06 485 * For 4K granule only, attempt to put down a 1GB block
206a2a73a62d37 Steve Capper 2014-05-06 486 */
1310222c276b79 Anshuman Khandual 2022-02-16 487 if (pud_sect_supported() &&
1310222c276b79 Anshuman Khandual 2022-02-16 488 ((addr | next | phys) & ~PUD_MASK) == 0 &&
c0951366d4b7e0 Ard Biesheuvel 2017-03-09 489 (flags & NO_BLOCK_MAPPINGS) == 0) {
20a004e7b017cc Will Deacon 2018-02-15 490 pud_set_huge(pudp, phys, prot);
206a2a73a62d37 Steve Capper 2014-05-06 491
206a2a73a62d37 Steve Capper 2014-05-06 492 /*
e98216b52176ba Ard Biesheuvel 2016-10-21 493 * After the PUD entry has been populated once, we
e98216b52176ba Ard Biesheuvel 2016-10-21 494 * only allow updates to the permission attributes.
206a2a73a62d37 Steve Capper 2014-05-06 495 */
e98216b52176ba Ard Biesheuvel 2016-10-21 496 BUG_ON(!pgattr_change_is_safe(pud_val(old_pud),
20a004e7b017cc Will Deacon 2018-02-15 497 READ_ONCE(pud_val(*pudp))));
206a2a73a62d37 Steve Capper 2014-05-06 498 } else {
2451145c9a60e0 Yang Shi 2025-03-04 499 ret = alloc_init_cont_pmd(pudp, addr, next, phys, prot,
c0951366d4b7e0 Ard Biesheuvel 2017-03-09 500 pgtable_alloc, flags);
2451145c9a60e0 Yang Shi 2025-03-04 501 if (ret)
2451145c9a60e0 Yang Shi 2025-03-04 502 break;
e98216b52176ba Ard Biesheuvel 2016-10-21 503
e98216b52176ba Ard Biesheuvel 2016-10-21 504 BUG_ON(pud_val(old_pud) != 0 &&
20a004e7b017cc Will Deacon 2018-02-15 505 pud_val(old_pud) != READ_ONCE(pud_val(*pudp)));
206a2a73a62d37 Steve Capper 2014-05-06 506 }
c1cc1552616d0f Catalin Marinas 2012-03-05 507 phys += next - addr;
20a004e7b017cc Will Deacon 2018-02-15 508 } while (pudp++, addr = next, addr != end);
f4710445458c0a Mark Rutland 2016-01-25 509
6fad683b9a5c21 Yang Shi 2025-03-04 510 if (!split)
f4710445458c0a Mark Rutland 2016-01-25 @511 pud_clear_fixmap();
2451145c9a60e0 Yang Shi 2025-03-04 512
2451145c9a60e0 Yang Shi 2025-03-04 513 return ret;
c1cc1552616d0f Catalin Marinas 2012-03-05 514 }
c1cc1552616d0f Catalin Marinas 2012-03-05 515
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-03-08 2:02 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-04 22:19 [v3 PATCH 0/6] arm64: support FEAT_BBM level 2 and large block mapping when rodata=full Yang Shi
2025-03-04 22:19 ` [v3 PATCH 1/6] arm64: Add BBM Level 2 cpu feature Yang Shi
2025-03-04 22:19 ` [v3 PATCH 2/6] arm64: cpufeature: add AmpereOne to BBML2 allow list Yang Shi
2025-03-14 10:58 ` Ryan Roberts
2025-03-17 17:50 ` Yang Shi
2025-03-04 22:19 ` [v3 PATCH 3/6] arm64: mm: make __create_pgd_mapping() and helpers non-void Yang Shi
2025-03-14 11:51 ` Ryan Roberts
2025-03-17 17:53 ` Yang Shi
2025-05-07 8:18 ` Ryan Roberts
2025-05-07 22:19 ` Yang Shi
2025-03-04 22:19 ` [v3 PATCH 4/6] arm64: mm: support large block mapping when rodata=full Yang Shi
2025-03-08 1:53 ` kernel test robot [this message]
2025-03-14 13:29 ` Ryan Roberts
2025-03-17 17:57 ` Yang Shi
2025-03-04 22:19 ` [v3 PATCH 5/6] arm64: mm: support split CONT mappings Yang Shi
2025-03-14 13:33 ` Ryan Roberts
2025-03-04 22:19 ` [v3 PATCH 6/6] arm64: mm: split linear mapping if BBML2 is not supported on secondary CPUs Yang Shi
2025-03-13 17:28 ` [v3 PATCH 0/6] arm64: support FEAT_BBM level 2 and large block mapping when rodata=full Yang Shi
2025-03-13 17:36 ` Ryan Roberts
2025-03-13 17:40 ` Yang Shi
2025-04-10 22:00 ` Yang Shi
2025-04-14 13:03 ` Ryan Roberts
2025-04-14 21:24 ` Yang Shi
2025-05-02 11:51 ` Ryan Roberts
2025-05-05 21:39 ` Yang Shi
2025-05-07 7:58 ` Ryan Roberts
2025-05-07 21:16 ` Yang Shi
2025-05-28 0:00 ` Yang Shi
2025-05-28 3:47 ` Dev Jain
2025-05-28 13:13 ` Ryan Roberts
2025-05-28 15:18 ` Yang Shi
2025-05-28 17:12 ` Yang Shi
2025-05-29 8:48 ` Ryan Roberts
2025-05-29 15:33 ` Ryan Roberts
2025-05-29 17:35 ` Yang Shi
2025-05-29 18:30 ` Ryan Roberts
2025-05-29 19:52 ` Yang Shi
2025-05-30 7:17 ` Ryan Roberts
2025-05-30 21:21 ` Yang Shi
2025-05-29 7:36 ` Ryan Roberts
2025-05-29 16:37 ` Yang Shi
2025-05-29 17:01 ` Ryan Roberts
2025-05-29 17:50 ` Yang Shi
2025-05-29 18:34 ` Ryan Roberts
2025-05-29 20:52 ` Yang Shi
2025-05-30 7:59 ` Ryan Roberts
2025-05-30 17:18 ` Yang Shi
2025-06-02 10:47 ` Ryan Roberts
2025-06-02 20:55 ` Yang Shi
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=202503080930.7ZetfmFz-lkp@intel.com \
--to=lkp@intel.com \
--cc=Miko.Lenczewski@arm.com \
--cc=catalin.marinas@arm.com \
--cc=cl@gentwo.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=ryan.roberts@arm.com \
--cc=scott@os.amperecomputing.com \
--cc=will@kernel.org \
--cc=yang@os.amperecomputing.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.