Page MenuHomeFreeBSD

D20416.id57926.diff
No OneTemporary

D20416.id57926.diff

Index: sys/arm64/acpica/acpi_iort.c
===================================================================
--- sys/arm64/acpica/acpi_iort.c
+++ sys/arm64/acpica/acpi_iort.c
@@ -370,19 +370,43 @@
ACPI_SRAT_GIC_ITS_AFFINITY *gicits;
struct iort_node *its_node;
struct iort_its_entry *its_entry;
- int i, matches;
+ int *map_counts;
+ int i, matches, dom;
if (entry->Type != ACPI_SRAT_TYPE_GIC_ITS_AFFINITY)
return;
matches = 0;
+ map_counts = arg;
gicits = (ACPI_SRAT_GIC_ITS_AFFINITY *)entry;
+ dom = acpi_map_pxm_to_vm_domainid(gicits->ProximityDomain);
+
+ /*
+ * Catch firmware and config errors. map_counts keeps a
+ * count of ProximityDomain values mapping to a domain ID
+ */
+#if MAXMEMDOM > 1
+ if (dom == -1)
+ printf("Firmware Error: Proximity Domain %d could not be"
+ " mapped for GIC ITS ID %d!\n",
+ gicits->ProximityDomain, gicits->ItsId);
+#endif
+ i = ++map_counts[dom + 1];
+ if (i > 0) {
+#ifdef NUMA
+ if (dom != -1)
+ printf("ERROR: Multiple Proximity Domains map to the"
+ " same NUMA node %d!\n", dom);
+#else
+ printf("WARNING: multiple Proximtiy Domains but"
+ "NUMA NOT enabled in kernel!\n");
+#endif
+ }
TAILQ_FOREACH(its_node, &its_groups, next) {
its_entry = its_node->entries.its;
for (i = 0; i < its_node->nentries; i++, its_entry++) {
if (its_entry->its_id == gicits->ItsId) {
- its_entry->pxm = acpi_map_pxm_to_vm_domainid(
- gicits->ProximityDomain);
+ its_entry->pxm = dom;
matches++;
}
}
@@ -401,6 +425,7 @@
ACPI_TABLE_MADT *madt;
ACPI_TABLE_SRAT *srat;
vm_paddr_t madt_pa, srat_pa;
+ int map_counts[MAXMEMDOM + 1] = { 0 };
/* Check ITS block in MADT */
madt_pa = acpi_find_table(ACPI_SIG_MADT);
@@ -417,7 +442,7 @@
srat = acpi_map_table(srat_pa, ACPI_SIG_SRAT);
KASSERT(srat != NULL, ("can't map SRAT!"));
acpi_walk_subtables(srat + 1, (char *)srat + srat->Header.Length,
- srat_resolve_its_pxm, NULL);
+ srat_resolve_its_pxm, map_counts);
acpi_unmap_table(srat);
}
return (0);

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 26, 11:03 PM (11 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15608739
Default Alt Text
D20416.id57926.diff (1 KB)

Event Timeline