diff options
-rw-r--r-- | src/soc/intel/xeon_sp/include/soc/numa.h | 2 | ||||
-rw-r--r-- | src/soc/intel/xeon_sp/spr/chip.c | 2 | ||||
-rw-r--r-- | src/soc/intel/xeon_sp/spr/numa.c | 4 | ||||
-rw-r--r-- | src/soc/intel/xeon_sp/spr/soc_util.c | 2 | ||||
-rw-r--r-- | src/soc/intel/xeon_sp/uncore_acpi_cxl.c | 7 |
5 files changed, 9 insertions, 8 deletions
diff --git a/src/soc/intel/xeon_sp/include/soc/numa.h b/src/soc/intel/xeon_sp/include/soc/numa.h index 48141c73f7..6aaf1723a3 100644 --- a/src/soc/intel/xeon_sp/include/soc/numa.h +++ b/src/soc/intel/xeon_sp/include/soc/numa.h @@ -41,7 +41,7 @@ struct proximity_domain { /* * Below fields are set to 0 for processor domains. */ - uint32_t device_handle; /* This holds PCIe device segment, BDF info */ + struct device *dev; uint32_t base; /* Memory region base address in the unit of 64MB */ uint32_t size; /* Memory region size in the unit of 64MB */ }; diff --git a/src/soc/intel/xeon_sp/spr/chip.c b/src/soc/intel/xeon_sp/spr/chip.c index abab0d2413..cebe4fe366 100644 --- a/src/soc/intel/xeon_sp/spr/chip.c +++ b/src/soc/intel/xeon_sp/spr/chip.c @@ -199,7 +199,7 @@ static void rcec_init(struct device *dev) for (i = 0; i < pds.num_pds; i++) { if (pds.pds[i].pd_type == PD_TYPE_PROCESSOR) continue; - ep_bus = pds.pds[i].device_handle >> 20; + ep_bus = PCI_BDF(pds.pds[i].dev) >> 20; if (ep_bus == ecrc_bus + 1) break; } diff --git a/src/soc/intel/xeon_sp/spr/numa.c b/src/soc/intel/xeon_sp/spr/numa.c index ef1c15340d..169f4f848b 100644 --- a/src/soc/intel/xeon_sp/spr/numa.c +++ b/src/soc/intel/xeon_sp/spr/numa.c @@ -19,7 +19,7 @@ void dump_pds(void) printk(BIOS_DEBUG, "\tproximity domain %d:\n", i); printk(BIOS_DEBUG, "\t\ttype:%d\n", pds.pds[i].pd_type); printk(BIOS_DEBUG, "\t\tsocket_bitmap:0x%x\n", pds.pds[i].socket_bitmap); - printk(BIOS_DEBUG, "\t\tdevice_handle:0x%x\n", pds.pds[i].device_handle); + printk(BIOS_DEBUG, "\t\tdevice:%s\n", pds.pds[i].dev ? dev_path(pds.pds[i].dev) : ""); printk(BIOS_DEBUG, "\t\tbase(64MB):0x%x\n", pds.pds[i].base); printk(BIOS_DEBUG, "\t\tsize(64MB):0x%x\n", pds.pds[i].size); } @@ -85,7 +85,7 @@ enum cb_err fill_pds(void) pds.pds[i].base = node.Address; pds.pds[i].size = node.Size; dev = pcie_find_dsn(node.SerialNumber, node.VendorId, 0); - pds.pds[i].device_handle = PCI_BDF(dev); + pds.pds[i].dev = dev; pds.pds[i].distances = malloc(sizeof(uint8_t) * pds.num_pds); if (!pds.pds[i].distances) die("%s %d out of memory.", __FILE__, __LINE__); diff --git a/src/soc/intel/xeon_sp/spr/soc_util.c b/src/soc/intel/xeon_sp/spr/soc_util.c index fb8761189c..a2516dfef8 100644 --- a/src/soc/intel/xeon_sp/spr/soc_util.c +++ b/src/soc/intel/xeon_sp/spr/soc_util.c @@ -91,7 +91,7 @@ bool is_iio_cxl_stack_res(const STACK_RES *res) if (pds.pds[i].pd_type == PD_TYPE_PROCESSOR) continue; - uint32_t bus = pds.pds[i].device_handle >> 20; + uint32_t bus = PCI_BDF(pds.pds[i].dev) >> 20; if (bus >= res->BusBase && bus <= res->BusLimit) return true; } diff --git a/src/soc/intel/xeon_sp/uncore_acpi_cxl.c b/src/soc/intel/xeon_sp/uncore_acpi_cxl.c index de776eb7c0..5bd13d0211 100644 --- a/src/soc/intel/xeon_sp/uncore_acpi_cxl.c +++ b/src/soc/intel/xeon_sp/uncore_acpi_cxl.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ +#include <device/pci_ops.h> #include <soc/acpi.h> #include <soc/numa.h> #include <soc/util.h> @@ -16,9 +17,9 @@ unsigned long cxl_fill_srat(unsigned long current) uint8_t bus, dev, func; uint32_t base, size; for (uint8_t i = soc_get_num_cpus(); i < pds.num_pds; i++) { - bus = pds.pds[i].device_handle >> 20; - dev = (pds.pds[i].device_handle >> 15) & 0x1f; - func = (pds.pds[i].device_handle >> 12) & 0x07; + bus = PCI_BDF(pds.pds[i].dev) >> 20; + dev = (PCI_BDF(pds.pds[i].dev) >> 15) & 0x1f; + func = (PCI_BDF(pds.pds[i].dev) >> 12) & 0x07; printk(BIOS_DEBUG, "adding srat GIA ID: %d, seg: 0x%x, bus: 0x%x, dev: 0x%x, func: 0x%x\n", i, seg, bus, dev, func); |