[intel-tdx:guest 129/144] arch/x86/kernel/acpi/boot.c:1134: undefined reference to `swiotlb_hint_cpus'

From: kernel test robot
Date: Wed Nov 17 2021 - 04:36:54 EST


tree: https://github.com/intel/tdx.git guest
head: 41fe88a1b3c28543f49fa6ed9e0e9b6650ed7614
commit: 4529b5784c141782c72ec9bd9a92df2b68cb7d45 [129/144] swiotlb: Split up single swiotlb lock
config: i386-randconfig-a012-20211116 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/intel/tdx/commit/4529b5784c141782c72ec9bd9a92df2b68cb7d45
git remote add intel-tdx https://github.com/intel/tdx.git
git fetch --no-tags intel-tdx guest
git checkout 4529b5784c141782c72ec9bd9a92df2b68cb7d45
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

ld: arch/x86/kernel/acpi/boot.o: in function `acpi_parse_madt_lapic_entries':
>> arch/x86/kernel/acpi/boot.c:1134: undefined reference to `swiotlb_hint_cpus'


vim +1134 arch/x86/kernel/acpi/boot.c

1092
1093 static int __init acpi_parse_madt_lapic_entries(void)
1094 {
1095 int count;
1096 int x2count = 0;
1097 int ret;
1098 struct acpi_subtable_proc madt_proc[2];
1099
1100 if (!boot_cpu_has(X86_FEATURE_APIC))
1101 return -ENODEV;
1102
1103 count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_SAPIC,
1104 acpi_parse_sapic, MAX_LOCAL_APIC);
1105
1106 if (!count) {
1107 memset(madt_proc, 0, sizeof(madt_proc));
1108 madt_proc[0].id = ACPI_MADT_TYPE_LOCAL_APIC;
1109 madt_proc[0].handler = acpi_parse_lapic;
1110 madt_proc[1].id = ACPI_MADT_TYPE_LOCAL_X2APIC;
1111 madt_proc[1].handler = acpi_parse_x2apic;
1112 ret = acpi_table_parse_entries_array(ACPI_SIG_MADT,
1113 sizeof(struct acpi_table_madt),
1114 madt_proc, ARRAY_SIZE(madt_proc), MAX_LOCAL_APIC);
1115 if (ret < 0) {
1116 pr_err("Error parsing LAPIC/X2APIC entries\n");
1117 return ret;
1118 }
1119
1120 count = madt_proc[0].count;
1121 x2count = madt_proc[1].count;
1122 }
1123 if (!count && !x2count) {
1124 pr_err("No LAPIC entries present\n");
1125 /* TBD: Cleanup to allow fallback to MPS */
1126 return -ENODEV;
1127 } else if (count < 0 || x2count < 0) {
1128 pr_err("Error parsing LAPIC entry\n");
1129 /* TBD: Cleanup to allow fallback to MPS */
1130 return count;
1131 }
1132
1133 /* This does not take overrides into consideration */
> 1134 swiotlb_hint_cpus(max(count, x2count));
1135
1136 x2count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_X2APIC_NMI,
1137 acpi_parse_x2apic_nmi, 0);
1138 count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC_NMI,
1139 acpi_parse_lapic_nmi, 0);
1140 if (count < 0 || x2count < 0) {
1141 pr_err("Error parsing LAPIC NMI entry\n");
1142 /* TBD: Cleanup to allow fallback to MPS */
1143 return count;
1144 }
1145 return 0;
1146 }
1147

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip