git: 0906563718d3 - main - Stop reading the arm64 domain when it's known

From: Andrew Turner <andrew_at_FreeBSD.org>
Date: Tue, 12 Oct 2021 12:21:44 UTC
The branch main has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=0906563718d35643789fc2b3c4cf1fc6884755e5

commit 0906563718d35643789fc2b3c4cf1fc6884755e5
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2021-10-12 11:39:14 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2021-10-12 12:16:00 +0000

    Stop reading the arm64 domain when it's known
    
    There is no need to read the domain on arm64 when there is only one
    in the ACPI tables. This can also happen when the table is missing
    as it is unneeded.
    
    Reported by:    dch
    Sponsored by:   The FreeBSD Foundation
---
 sys/arm64/arm64/mp_machdep.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/arm64/arm64/mp_machdep.c b/sys/arm64/arm64/mp_machdep.c
index 82f47a6f9918..5f88900f4074 100644
--- a/sys/arm64/arm64/mp_machdep.c
+++ b/sys/arm64/arm64/mp_machdep.c
@@ -566,10 +566,10 @@ madt_handler(ACPI_SUBTABLE_HEADER *entry, void *arg)
 		else
 			id = *cpuid;
 
-#ifdef NUMA
-		domain = acpi_pxm_get_cpu_locality(*cpuid);
-#else
 		domain = 0;
+#ifdef NUMA
+		if (vm_ndomains > 1)
+			domain = acpi_pxm_get_cpu_locality(*cpuid);
 #endif
 		if (start_cpu(id, intr->ArmMpidr, domain)) {
 			MPASS(cpuid_to_pcpu[id] != NULL);