From: kernel test robot <lkp@intel.com>
To: Gregory Price <gourry@gourry.net>
Cc: oe-kbuild-all@lists.linux.dev, Gregory Price <gourry@gourry.net>
Subject: [gourryinverse:memblock_align 3/3] drivers/acpi/numa/srat.c:534:undefined reference to `memory_block_size_bytes'
Date: Fri, 4 Oct 2024 05:43:35 +0800 [thread overview]
Message-ID: <202410040535.cQL1W8UX-lkp@intel.com> (raw)
tree: https://github.com/gourryinverse/linux memblock_align
head: 85581c6ddb334a93f79f93e6c0e5fbee1b4649ae
commit: 85581c6ddb334a93f79f93e6c0e5fbee1b4649ae [3/3] acpi,srat: reduce memory block size if CFMWS has a smaller alignment
config: loongarch-randconfig-002-20241004 (https://download.01.org/0day-ci/archive/20241004/202410040535.cQL1W8UX-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241004/202410040535.cQL1W8UX-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/202410040535.cQL1W8UX-lkp@intel.com/
All errors (new ones prefixed by >>):
loongarch64-linux-ld: drivers/acpi/numa/srat.o: in function `acpi_numa_init':
>> drivers/acpi/numa/srat.c:534:(.init.text+0x1024): undefined reference to `memory_block_size_bytes'
>> loongarch64-linux-ld: drivers/acpi/numa/srat.c:592:(.init.text+0x11c8): undefined reference to `set_memory_block_size_order'
vim +534 drivers/acpi/numa/srat.c
530
531 int __init acpi_numa_init(void)
532 {
533 int i, fake_pxm, cnt = 0;
> 534 unsigned long block_sz = memory_block_size_bytes();
535 unsigned long cfmw_align = block_sz;
536
537 if (acpi_disabled)
538 return -EINVAL;
539
540 /*
541 * Should not limit number with cpu num that is from NR_CPUS or nr_cpus=
542 * SRAT cpu entries could have different order with that in MADT.
543 * So go over all cpu entries in SRAT to get apicid to node mapping.
544 */
545
546 /* SRAT: System Resource Affinity Table */
547 if (!acpi_table_parse(ACPI_SIG_SRAT, acpi_parse_srat)) {
548 struct acpi_subtable_proc srat_proc[5];
549
550 memset(srat_proc, 0, sizeof(srat_proc));
551 srat_proc[0].id = ACPI_SRAT_TYPE_CPU_AFFINITY;
552 srat_proc[0].handler = acpi_parse_processor_affinity;
553 srat_proc[1].id = ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY;
554 srat_proc[1].handler = acpi_parse_x2apic_affinity;
555 srat_proc[2].id = ACPI_SRAT_TYPE_GICC_AFFINITY;
556 srat_proc[2].handler = acpi_parse_gicc_affinity;
557 srat_proc[3].id = ACPI_SRAT_TYPE_GENERIC_AFFINITY;
558 srat_proc[3].handler = acpi_parse_gi_affinity;
559 srat_proc[4].id = ACPI_SRAT_TYPE_RINTC_AFFINITY;
560 srat_proc[4].handler = acpi_parse_rintc_affinity;
561
562 acpi_table_parse_entries_array(ACPI_SIG_SRAT,
563 sizeof(struct acpi_table_srat),
564 srat_proc, ARRAY_SIZE(srat_proc), 0);
565
566 cnt = acpi_table_parse_srat(ACPI_SRAT_TYPE_MEMORY_AFFINITY,
567 acpi_parse_memory_affinity, 0);
568 }
569
570 /* SLIT: System Locality Information Table */
571 acpi_table_parse(ACPI_SIG_SLIT, acpi_parse_slit);
572
573 /*
574 * CXL Fixed Memory Window Structures (CFMWS) must be parsed
575 * after the SRAT. Create NUMA Nodes for CXL memory ranges that
576 * are defined in the CFMWS and not already defined in the SRAT.
577 * Initialize a fake_pxm as the first available PXM to emulate.
578 */
579
580 /* fake_pxm is the next unused PXM value after SRAT parsing */
581 for (i = 0, fake_pxm = -1; i < MAX_NUMNODES; i++) {
582 if (node_to_pxm_map[i] > fake_pxm)
583 fake_pxm = node_to_pxm_map[i];
584 }
585 last_real_pxm = fake_pxm;
586 fake_pxm++;
587
588 /* Calculate and set largest supported memory block size alignment */
589 acpi_table_parse_cedt(ACPI_CEDT_TYPE_CFMWS, acpi_align_cfmws,
590 &cfmw_align);
591 if (cfmw_align < block_sz && cfmw_align >= SZ_256M) {
> 592 if (set_memory_block_size_order(ffs(cfmw_align)-1)) {
593 pr_warn("CFMWS: Unable to adjust memory block size\n");
594 }
595 }
596
597 /* Then parse and fill the numa nodes with the described memory */
598 acpi_table_parse_cedt(ACPI_CEDT_TYPE_CFMWS, acpi_parse_cfmws,
599 &fake_pxm);
600
601 if (cnt < 0)
602 return cnt;
603 else if (!parsed_numa_memblks)
604 return -ENOENT;
605 return 0;
606 }
607
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2024-10-03 21:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-03 21:43 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-10-02 11:18 [gourryinverse:memblock_align 3/3] drivers/acpi/numa/srat.c:534:undefined reference to `memory_block_size_bytes' kernel test robot
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=202410040535.cQL1W8UX-lkp@intel.com \
--to=lkp@intel.com \
--cc=gourry@gourry.net \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is 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.