Attention is currently required from: Arthur Heymans, Christian Walter, Johnny Lin, Jonathan Zhang, Lean Sheng Tan, Patrick Rudolph, Tim Chu.
Shuo Liu has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/81554?usp=email )
Change subject: device/device_util: Rename dev_get_pci_domain ......................................................................
device/device_util: Rename dev_get_pci_domain
In coreboot, domain indicates hardware units that functions as PCIe host bridges. For Xeon-SP, these PCIe host bridges further function in many aspects, e.g. PCIe, CXL, IOAT, UBOX.
Rename dev_get_pci_domain to dev_get_domain to align the coreboot device util with coreboot concept and distinguish from Xeon-SP concept.
Change-Id: I51b18b30fb41038869ea1384b01091da31a895b9 Signed-off-by: Shuo Liu shuo.liu@intel.com --- M src/device/device_util.c M src/include/device/device.h M src/soc/intel/xeon_sp/chip_common.c M src/soc/intel/xeon_sp/include/soc/chip_common.h M src/soc/intel/xeon_sp/uncore_acpi.c 5 files changed, 12 insertions(+), 12 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/54/81554/1
diff --git a/src/device/device_util.c b/src/device/device_util.c index 89e77d4..2764211 100644 --- a/src/device/device_util.c +++ b/src/device/device_util.c @@ -251,7 +251,7 @@ }
/* Returns the PCI domain for the given PCI device */ -const struct device *dev_get_pci_domain(const struct device *dev) +const struct device *dev_get_domain(const struct device *dev) { assert(is_pci(dev));
diff --git a/src/include/device/device.h b/src/include/device/device.h index 67b641f..7e5ebde 100644 --- a/src/include/device/device.h +++ b/src/include/device/device.h @@ -182,7 +182,7 @@ const char *dev_name(const struct device *dev); const char *dev_path(const struct device *dev); u32 dev_path_encode(const struct device *dev); -const struct device *dev_get_pci_domain(const struct device *dev); +const struct device *dev_get_domain(const struct device *dev); void dev_set_enabled(struct device *dev, int enable); void disable_children(struct bus *bus); bool dev_is_active_bridge(struct device *dev); diff --git a/src/soc/intel/xeon_sp/chip_common.c b/src/soc/intel/xeon_sp/chip_common.c index d6fd5b0..058f2a5 100644 --- a/src/soc/intel/xeon_sp/chip_common.c +++ b/src/soc/intel/xeon_sp/chip_common.c @@ -46,7 +46,7 @@ if (dev->path.type != DEVICE_PATH_PCI) return 0;
- const struct device *domain = dev_get_pci_domain(dev); + const struct device *domain = dev_get_domain(dev); if (!domain) return 0;
@@ -141,7 +141,7 @@ if (dev->path.type == DEVICE_PATH_DOMAIN) domain = dev; else - domain = dev_get_pci_domain(dev); + domain = dev_get_domain(dev);
if (!domain) return -1; @@ -167,7 +167,7 @@ if (dev->path.type == DEVICE_PATH_DOMAIN) domain = dev; else - domain = dev_get_pci_domain(dev); + domain = dev_get_domain(dev);
if (!domain) return -1; diff --git a/src/soc/intel/xeon_sp/include/soc/chip_common.h b/src/soc/intel/xeon_sp/include/soc/chip_common.h index 1f92a63..488673c 100644 --- a/src/soc/intel/xeon_sp/include/soc/chip_common.h +++ b/src/soc/intel/xeon_sp/include/soc/chip_common.h @@ -79,14 +79,14 @@ bool is_ubox_domain(const struct device *dev); bool is_cxl_domain(const struct device *dev);
-#define is_dev_on_pcie_domain(dev) is_pcie_domain(dev_get_pci_domain(dev)) -#define is_dev_on_ioat_domain(dev) is_ioat_domain(dev_get_pci_domain(dev)) -#define is_dev_on_ubox_domain(dev) is_ubox_domain(dev_get_pci_domain(dev)) -#define is_dev_on_cxl_domain(dev) is_cxl_domain(dev_get_pci_domain(dev)) +#define is_dev_on_pcie_domain(dev) is_pcie_domain(dev_get_domain(dev)) +#define is_dev_on_ioat_domain(dev) is_ioat_domain(dev_get_domain(dev)) +#define is_dev_on_ubox_domain(dev) is_ubox_domain(dev_get_domain(dev)) +#define is_dev_on_cxl_domain(dev) is_cxl_domain(dev_get_domain(dev))
#define is_domain0(dev) (dev && dev->path.type == DEVICE_PATH_DOMAIN &&\ dev->path.domain.domain == 0) -#define is_dev_on_domain0(dev) (is_domain0(dev_get_pci_domain(dev))) +#define is_dev_on_domain0(dev) (is_domain0(dev_get_domain(dev))) #define is_stack0(socket, stack) (socket == 0 && stack == IioStack0)
enum { diff --git a/src/soc/intel/xeon_sp/uncore_acpi.c b/src/soc/intel/xeon_sp/uncore_acpi.c index c88707e..90cc108 100644 --- a/src/soc/intel/xeon_sp/uncore_acpi.c +++ b/src/soc/intel/xeon_sp/uncore_acpi.c @@ -315,7 +315,7 @@
// Add PCIe Ports if (!is_dev_on_domain0(iommu)) { - const struct device *domain = dev_get_pci_domain(iommu); + const struct device *domain = dev_get_domain(iommu); struct device *dev = NULL; while ((dev = dev_bus_each_child(domain->downstream, dev))) if ((dev->hdr_type & 0x7f) == PCI_HEADER_TYPE_BRIDGE) @@ -535,7 +535,7 @@ struct device *dev = NULL; struct device *iommu0 = NULL; while ((dev = dev_find_device(PCI_VID_INTEL, MMAP_VTD_CFG_REG_DEVID, dev))) { - if (is_domain0(dev_get_pci_domain(dev))) { + if (is_domain0(dev_get_domain(dev))) { iommu0 = dev; continue; }