platform/x86: ISST: PUNIT device mapping with Sub-NUMA clustering
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Wed, 29 Jun 2022 19:48:17 +0000 (12:48 -0700)
committerHans de Goede <hdegoede@redhat.com>
Sat, 2 Jul 2022 09:42:54 +0000 (11:42 +0200)
commit9a1aac8a96dc014bec49806a7a964bf2fdbd315f
tree60a3f5593cfc5031583264a973e3cd9f25b1ad3a
parent221756e61b7cc3d7f47f57fb4f371242aa4ccb1d
platform/x86: ISST: PUNIT device mapping with Sub-NUMA clustering

On a multiple package system using Sub-NUMA clustering, there is an issue
in mapping Linux CPU number to PUNIT PCI device when manufacturer decided
to reuse the PCI bus number across packages. Bus number can be reused as
long as they are in different domain or segment. In this case some CPU
will fail to find a PCI device to issue SST requests.

When bus numbers are reused across CPU packages, we are using proximity
information by matching CPU numa node id to PUNIT PCI device numa node
id. But on a package there can be only one PUNIT PCI device, but multiple
numa nodes (one for each sub cluster). So, the numa node ID of the PUNIT
PCI device can only match with one numa node id of CPUs in a sub cluster
in the package.

Since there can be only one PUNIT PCI device per package, if we match
with numa node id of any sub cluster in that package, we can use that
mapping for any CPU in that package. So, store the match information
in a per package data structure and return the information when there
is no match.

While here, use defines for max bus number instead of hardcoding.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Link: https://lore.kernel.org/r/20220629194817.2418240-1-srinivas.pandruvada@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/intel/speed_select_if/isst_if_common.c