ACPI: NUMA: Add handler for SRAT RINTC affinity structure
Add RINTC affinity structure handler during parsing SRAT table. Signed-off-by: Haibo Xu <haibo1.xu@intel.com> Reviewed-by: Sunil V L <sunilvl@ventanamicro.com> Reviewed-by: Hanjun Guo <guohanjun@huawei.com> Link: https://lore.kernel.org/r/e076514d78d92f104a5f2d8c82b8921f6aa26fdd.1718268003.git.haibo1.xu@intel.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
This commit is contained in:
parent
eabd9db64e
commit
39494aec8a
@ -167,6 +167,19 @@ acpi_table_print_srat_entry(struct acpi_subtable_header *header)
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case ACPI_SRAT_TYPE_RINTC_AFFINITY:
|
||||
{
|
||||
struct acpi_srat_rintc_affinity *p =
|
||||
(struct acpi_srat_rintc_affinity *)header;
|
||||
pr_debug("SRAT Processor (acpi id[0x%04x]) in proximity domain %d %s\n",
|
||||
p->acpi_processor_uid,
|
||||
p->proximity_domain,
|
||||
(p->flags & ACPI_SRAT_RINTC_ENABLED) ?
|
||||
"enabled" : "disabled");
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
pr_warn("Found unsupported SRAT entry (type = 0x%x)\n",
|
||||
header->type);
|
||||
@ -450,6 +463,21 @@ acpi_parse_gi_affinity(union acpi_subtable_headers *header,
|
||||
}
|
||||
#endif /* defined(CONFIG_X86) || defined (CONFIG_ARM64) */
|
||||
|
||||
static int __init
|
||||
acpi_parse_rintc_affinity(union acpi_subtable_headers *header,
|
||||
const unsigned long end)
|
||||
{
|
||||
struct acpi_srat_rintc_affinity *rintc_affinity;
|
||||
|
||||
rintc_affinity = (struct acpi_srat_rintc_affinity *)header;
|
||||
acpi_table_print_srat_entry(&header->common);
|
||||
|
||||
/* let architecture-dependent part to do it */
|
||||
acpi_numa_rintc_affinity_init(rintc_affinity);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __init acpi_parse_srat(struct acpi_table_header *table)
|
||||
{
|
||||
struct acpi_table_srat *srat = (struct acpi_table_srat *)table;
|
||||
@ -485,7 +513,7 @@ int __init acpi_numa_init(void)
|
||||
|
||||
/* SRAT: System Resource Affinity Table */
|
||||
if (!acpi_table_parse(ACPI_SIG_SRAT, acpi_parse_srat)) {
|
||||
struct acpi_subtable_proc srat_proc[4];
|
||||
struct acpi_subtable_proc srat_proc[5];
|
||||
|
||||
memset(srat_proc, 0, sizeof(srat_proc));
|
||||
srat_proc[0].id = ACPI_SRAT_TYPE_CPU_AFFINITY;
|
||||
@ -496,6 +524,8 @@ int __init acpi_numa_init(void)
|
||||
srat_proc[2].handler = acpi_parse_gicc_affinity;
|
||||
srat_proc[3].id = ACPI_SRAT_TYPE_GENERIC_AFFINITY;
|
||||
srat_proc[3].handler = acpi_parse_gi_affinity;
|
||||
srat_proc[4].id = ACPI_SRAT_TYPE_RINTC_AFFINITY;
|
||||
srat_proc[4].handler = acpi_parse_rintc_affinity;
|
||||
|
||||
acpi_table_parse_entries_array(ACPI_SIG_SRAT,
|
||||
sizeof(struct acpi_table_srat),
|
||||
|
Loading…
x
Reference in New Issue
Block a user