// SPDX-License-Identifier: GPL-2.0 /* * ACPI 6.6 based NUMA setup for RISCV * Lots of code was borrowed from arch/arm64/kernel/acpi_numa.c * * Copyright 2004 Andi Kleen, SuSE Labs. * Copyright (C) 2013-2016, Linaro Ltd. * Author: Hanjun Guo <hanjun.guo@linaro.org> * Copyright (C) 2024 Intel Corporation. * * Reads the ACPI SRAT table to figure out what memory belongs to which CPUs. * * Called from acpi_numa_init while reading the SRAT and SLIT tables. * Assumes all memory regions belonging to a single proximity domain * are in one chunk. Holes between them will be included in the node.
*/
/* * If we can't map the UID to a logical cpu this * means that the UID is not part of possible cpus * so we do not need a NUMA mapping for it, skip * the SRAT entry and keep parsing.
*/
cpu = get_cpu_for_acpi_id(pa->acpi_processor_uid); if (cpu < 0) return 0;
/* * In ACPI, SMP and CPU NUMA information is provided in separate * static tables, namely the MADT and the SRAT. * * Thus, it is simpler to first create the cpu logical map through * an MADT walk and then map the logical cpus to their node ids * as separate steps.
*/
acpi_table_parse_entries(ACPI_SIG_SRAT, sizeof(struct acpi_table_srat),
ACPI_SRAT_TYPE_RINTC_AFFINITY, acpi_parse_rintc_pxm, 0);
for (i = 0; i < nr_cpu_ids; i++)
early_map_cpu_to_node(i, acpi_numa_get_nid(i));
}
/* Callback for Proximity Domain -> logical node ID mapping */ void __init acpi_numa_rintc_affinity_init(struct acpi_srat_rintc_affinity *pa)
{ int pxm, node;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.