All of lore.kernel.org
 help / color / mirror / Atom feed
* [gourryinverse:memblock_align 3/3] drivers/acpi/numa/srat.c:534:undefined reference to `memory_block_size_bytes'
@ 2024-10-03 21:43 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2024-10-03 21:43 UTC (permalink / raw)
  To: Gregory Price; +Cc: oe-kbuild-all, Gregory Price

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

^ permalink raw reply	[flat|nested] 2+ messages in thread
* [gourryinverse:memblock_align 3/3] drivers/acpi/numa/srat.c:534:undefined reference to `memory_block_size_bytes'
@ 2024-10-02 11:18 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2024-10-02 11:18 UTC (permalink / raw)
  To: Gregory Price; +Cc: oe-kbuild-all, Gregory Price

tree:   https://github.com/gourryinverse/linux memblock_align
head:   cfea4dee5d4cf39fa5f13e25ae6c3a07fcec413e
commit: cfea4dee5d4cf39fa5f13e25ae6c3a07fcec413e [3/3] acpi,srat: reduce memory block size if CFMWS has a smaller alignment
config: loongarch-randconfig-002-20241002 (https://download.01.org/0day-ci/archive/20241002/202410021923.kJJh1P9X-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/20241002/202410021923.kJJh1P9X-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/202410021923.kJJh1P9X-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+0xcf4): undefined reference to `memory_block_size_bytes'
>> loongarch64-linux-ld: drivers/acpi/numa/srat.c:592:(.init.text+0xe7c): 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-10-03 21:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-03 21:43 [gourryinverse:memblock_align 3/3] drivers/acpi/numa/srat.c:534:undefined reference to `memory_block_size_bytes' kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2024-10-02 11:18 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.