Date: Sat, 8 Dec 2018 19:42:01 +0000 (UTC) From: "Jayachandran C." <jchandra@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341744 - in head/sys/arm64: acpica arm64 Message-ID: <201812081942.wB8Jg10K021362@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jchandra Date: Sat Dec 8 19:42:01 2018 New Revision: 341744 URL: https://svnweb.freebsd.org/changeset/base/341744 Log: arm64: add ACPI based NUMA support Use the newly defined SRAT/SLIT parsing APIs in arm64 to support ACPI based NUMA. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D17943 Modified: head/sys/arm64/acpica/acpi_machdep.c head/sys/arm64/arm64/mp_machdep.c Modified: head/sys/arm64/acpica/acpi_machdep.c ============================================================================== --- head/sys/arm64/acpica/acpi_machdep.c Sat Dec 8 19:32:23 2018 (r341743) +++ head/sys/arm64/acpica/acpi_machdep.c Sat Dec 8 19:42:01 2018 (r341744) @@ -233,3 +233,16 @@ acpi_map_addr(struct acpi_generic_address *addr, bus_s return (bus_space_map(*tag, phys, size, 0, handle)); } + +#if MAXMEMDOM > 1 +static void +parse_pxm_tables(void *dummy) +{ + + acpi_pxm_init(MAXCPU, (vm_paddr_t)1 << 40); + acpi_pxm_parse_tables(); + acpi_pxm_set_mem_locality(); +} +SYSINIT(parse_pxm_tables, SI_SUB_VM - 1, SI_ORDER_FIRST, parse_pxm_tables, + NULL); +#endif Modified: head/sys/arm64/arm64/mp_machdep.c ============================================================================== --- head/sys/arm64/arm64/mp_machdep.c Sat Dec 8 19:32:23 2018 (r341743) +++ head/sys/arm64/arm64/mp_machdep.c Sat Dec 8 19:42:01 2018 (r341744) @@ -442,13 +442,15 @@ madt_handler(ACPI_SUBTABLE_HEADER *entry, void *arg) { ACPI_MADT_GENERIC_INTERRUPT *intr; u_int *cpuid; + u_int id; switch(entry->Type) { case ACPI_MADT_TYPE_GENERIC_INTERRUPT: intr = (ACPI_MADT_GENERIC_INTERRUPT *)entry; cpuid = arg; - - start_cpu((*cpuid), intr->ArmMpidr); + id = *cpuid; + start_cpu(id, intr->ArmMpidr); + __pcpu[id].pc_acpi_id = intr->Uid; (*cpuid)++; break; default: @@ -478,6 +480,12 @@ cpu_init_acpi(void) madt_handler, &cpuid); acpi_unmap_table(madt); + +#if MAXMEMDOM > 1 + /* set proximity info */ + acpi_pxm_set_cpu_locality(); + acpi_pxm_free(); +#endif } #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812081942.wB8Jg10K021362>