Page MenuHomeFreeBSD

pci_host_generic_acpi: use NUMA node when allocating MSI/MSI-X
AbandonedPublic

Authored by jchandra on Oct 26 2018, 10:52 PM.
Tags
Referenced Files
Unknown Object (File)
Mar 13 2024, 6:18 PM
Unknown Object (File)
Jan 22 2024, 2:58 AM
Unknown Object (File)
Dec 23 2023, 1:26 AM
Unknown Object (File)
Jun 21 2023, 1:25 PM
Subscribers

Details

Reviewers
andrew
jhb
rstone
Group Reviewers
arm64
Summary

Use NUMA node info obtained from _PXM call to generate the XREFs used while allocating MSI/MSI-X interrupts.

This allows us to register the LPIs with the GIC ITS block on the same node.

The ACPI IORT table (from ARM) has to be decoded to do a complete implementation. This commit is sufficient for Cavium ThunderX2 (and maybe others) where there is one ITS block per NUMA node.

Test Plan

Boot up on Cavium ThunderX2

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 20453

Event Timeline

sys/dev/pci/pci_host_generic_acpi.c
314

This won't work as the errno values are positive. It might be better to set sc->xref in generic_pcie_acpi_get_domain, or to pass in a pointer to be set.

jchandra added inline comments.
sys/dev/pci/pci_host_generic_acpi.c
314

Will pass in a pointer - (forgot about this difference between FreeBSD and Linux).

Looking thru the code again, I think I forgot to call acpi_map_pxm_to_vm_domainid() too - although it does not make any difference now.

will fix both - thanks.

jchandra marked an inline comment as done and an inline comment as not done.Oct 27 2018, 10:57 PM
jchandra added inline comments.
sys/dev/pci/pci_host_generic_acpi.c
314

I think I forgot to call acpi_map_pxm_to_vm_domainid()

Please ignore this part. I had called it in generic_pcie_acpi_get_domain()

jchandra marked an inline comment as not done.

I will keep this on hold until we do ACPI based NUMA correctly. x86/acpica/srat.c seems to do most of the things we require, along with memory proximity and SLIT parsing - that would be a better starting point.

Need to take another look at this after handling IORT table parsing.