Attention is currently required from: Arthur Heymans, Christian Walter, Fred Reitberger, Jason Glenesk, Johnny Lin, Jonathan Zhang, Lean Sheng Tan, Martin L Roth, Matt DeVillier, Patrick Rudolph, Shuo Liu, Tim Chu, Varshit Pandya.

Felix Held uploaded patch set #4 to this change.

View Change

The following approvals got outdated and were removed: Code-Review+2 by Matt DeVillier, Verified+1 by build bot (Jenkins)

device: introduce and use dev_get_domain_id

To avoid having constructs like 'dev->path.domain.domain' in the SoC
code, create the 'dev_get_domain_id' helper function that returns the
domain ID of either that device if it's a domain device or the
corresponding domain device's domain ID, and use it in the code.

If this function is called with a device other than PCI or domain type,
it won't have a domain number. In order to not need to call 'die',
'dev_get_domain_id' will print an error and return 0 which is a valid
domain number. In that case, the calling code should be fixed.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I3d79f19846cea49609f848a4c42747ac1052c288
---
M src/device/device_util.c
M src/include/device/device.h
M src/soc/amd/common/block/data_fabric/domain.c
M src/soc/amd/common/block/data_fabric/pci_segment_multi.c
M src/soc/amd/common/block/data_fabric/pci_segment_single.c
M src/soc/amd/common/block/root_complex/root_complex.c
M src/soc/amd/genoa_poc/domain.c
M src/soc/intel/xeon_sp/acpi.c
M src/soc/intel/xeon_sp/chip_common.c
M src/soc/intel/xeon_sp/chip_gen1.c
M src/soc/intel/xeon_sp/chip_gen6.c
M src/vendorcode/amd/opensil/genoa_poc/mpio/chip.c
12 files changed, 31 insertions(+), 14 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/44/83644/4

To view, visit change 83644. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I3d79f19846cea49609f848a4c42747ac1052c288
Gerrit-Change-Number: 83644
Gerrit-PatchSet: 4
Gerrit-Owner: Felix Held <felix-coreboot@felixheld.de>
Gerrit-Reviewer: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-Reviewer: Christian Walter <christian.walter@9elements.com>
Gerrit-Reviewer: Fred Reitberger <reitbergerfred@gmail.com>
Gerrit-Reviewer: Jason Glenesk <jason.glenesk@gmail.com>
Gerrit-Reviewer: Johnny Lin <Johnny_Lin@wiwynn.com>
Gerrit-Reviewer: Jonathan Zhang <jon.zhixiong.zhang@gmail.com>
Gerrit-Reviewer: Lean Sheng Tan <sheng.tan@9elements.com>
Gerrit-Reviewer: Martin L Roth <gaumless@gmail.com>
Gerrit-Reviewer: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Gerrit-Reviewer: Patrick Rudolph <patrick.rudolph@9elements.com>
Gerrit-Reviewer: Shuo Liu <shuo.liu@intel.com>
Gerrit-Reviewer: Tim Chu <Tim.Chu@quantatw.com>
Gerrit-Reviewer: Varshit Pandya <pandyavarshit@gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-Attention: Patrick Rudolph <patrick.rudolph@9elements.com>
Gerrit-Attention: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Gerrit-Attention: Jonathan Zhang <jon.zhixiong.zhang@gmail.com>
Gerrit-Attention: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-Attention: Varshit Pandya <pandyavarshit@gmail.com>
Gerrit-Attention: Jason Glenesk <jason.glenesk@gmail.com>
Gerrit-Attention: Martin L Roth <gaumless@gmail.com>
Gerrit-Attention: Johnny Lin <Johnny_Lin@wiwynn.com>
Gerrit-Attention: Christian Walter <christian.walter@9elements.com>
Gerrit-Attention: Shuo Liu <shuo.liu@intel.com>
Gerrit-Attention: Lean Sheng Tan <sheng.tan@9elements.com>
Gerrit-Attention: Fred Reitberger <reitbergerfred@gmail.com>
Gerrit-Attention: Tim Chu <Tim.Chu@quantatw.com>