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
This commit is contained in:
parent
6fd503bd86
commit
5a913206e0
@ -233,3 +233,16 @@ acpi_map_addr(struct acpi_generic_address *addr, bus_space_tag_t *tag,
|
||||
|
||||
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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user