Skip to content

platform/x86: ISST: PUNIT device mapping with Sub-NUMA clustering

Prarit Bhargava requested to merge prarit/centos-stream-9:2139964 into main

Bugzilla: https://bugzilla.redhat.com/2139964

commit 9a1aac8a96dc014bec49806a7a964bf2fdbd315f
Author: Srinivas Pandruvada srinivas.pandruvada@linux.intel.com
Date: Wed Jun 29 12:48:17 2022 -0700

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>  

Signed-off-by: Prarit Bhargava prarit@redhat.com

Merge request reports