Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/42195 )
Change subject: sb/intel/bd82x6x/pcie.c: Move `pch_pcie_acpi_name` up ......................................................................
sb/intel/bd82x6x/pcie.c: Move `pch_pcie_acpi_name` up
The ASSERT() macro depends on the line number, so changing the line it appears in breaks reproducibility testing using BUILD_TIMELESS=1.
Work around this problem by placing the `pch_pcie_acpi_name` function, which contains this macro, at the beginning of the file. This allows refactoring the rest of the code without affecting the ASSERT() macro.
Change-Id: I2e0432ec9ae6c7d033fc7495afb3a71fe7e77729 Signed-off-by: Angel Pons th3fanbus@gmail.com --- M src/southbridge/intel/bd82x6x/pcie.c 1 file changed, 20 insertions(+), 20 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/95/42195/1
diff --git a/src/southbridge/intel/bd82x6x/pcie.c b/src/southbridge/intel/bd82x6x/pcie.c index 5bc3412..ff881ac 100644 --- a/src/southbridge/intel/bd82x6x/pcie.c +++ b/src/southbridge/intel/bd82x6x/pcie.c @@ -13,6 +13,26 @@ #include "chip.h" #include "pch.h"
+static const char *pch_pcie_acpi_name(const struct device *dev) +{ + ASSERT(dev); + + if (PCI_SLOT(dev->path.pci.devfn) == 0x1c) { + static const char *names[] = { "RP01", + "RP02", + "RP03", + "RP04", + "RP05", + "RP06", + "RP07", + "RP08"}; + + return names[PCI_FUNC(dev->path.pci.devfn)]; + } + + return NULL; +} + static void pch_pcie_pm_early(struct device *dev) { u16 link_width_p0, link_width_p4; @@ -272,26 +292,6 @@ pch_pcie_pm_late(dev); }
-static const char *pch_pcie_acpi_name(const struct device *dev) -{ - ASSERT(dev); - - if (PCI_SLOT(dev->path.pci.devfn) == 0x1c) { - static const char *names[] = { "RP01", - "RP02", - "RP03", - "RP04", - "RP05", - "RP06", - "RP07", - "RP08"}; - - return names[PCI_FUNC(dev->path.pci.devfn)]; - } - - return NULL; -} - static struct device_operations device_ops = { .read_resources = pci_bus_read_resources, .set_resources = pci_dev_set_resources,
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42195 )
Change subject: sb/intel/bd82x6x/pcie.c: Move `pch_pcie_acpi_name` up ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/42195/1/src/southbridge/intel/bd82x... File src/southbridge/intel/bd82x6x/pcie.c:
https://review.coreboot.org/c/coreboot/+/42195/1/src/southbridge/intel/bd82x... PS1, Line 21: static const char *names[] = { "RP01", static const char * array should probably be static const char * const
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42195 )
Change subject: sb/intel/bd82x6x/pcie.c: Move `pch_pcie_acpi_name` up ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/42195/1/src/southbridge/intel/bd82x... File src/southbridge/intel/bd82x6x/pcie.c:
PS1: this is not for merge, right?
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42195 )
Change subject: sb/intel/bd82x6x/pcie.c: Move `pch_pcie_acpi_name` up ......................................................................
Patch Set 1: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/42195/1/src/southbridge/intel/bd82x... File src/southbridge/intel/bd82x6x/pcie.c:
PS1:
this is not for merge, right?
just checked back and this is meant to be merged , since more changes are planned that profit from this one
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42195 )
Change subject: sb/intel/bd82x6x/pcie.c: Move `pch_pcie_acpi_name` up ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/42195/1/src/southbridge/intel/bd82x... File src/southbridge/intel/bd82x6x/pcie.c:
PS1:
this is not for merge, right?
It is meant to be merged. It's a workaround to simplify timeless checking. CB:42196 is a more proper thing, but it's going to take a while to get merged.
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/42195 )
Change subject: sb/intel/bd82x6x/pcie.c: Move `pch_pcie_acpi_name` up ......................................................................
sb/intel/bd82x6x/pcie.c: Move `pch_pcie_acpi_name` up
The ASSERT() macro depends on the line number, so changing the line it appears in breaks reproducibility testing using BUILD_TIMELESS=1.
Work around this problem by placing the `pch_pcie_acpi_name` function, which contains this macro, at the beginning of the file. This allows refactoring the rest of the code without affecting the ASSERT() macro.
Change-Id: I2e0432ec9ae6c7d033fc7495afb3a71fe7e77729 Signed-off-by: Angel Pons th3fanbus@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/42195 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Felix Held felix-coreboot@felixheld.de --- M src/southbridge/intel/bd82x6x/pcie.c 1 file changed, 20 insertions(+), 20 deletions(-)
Approvals: build bot (Jenkins): Verified Felix Held: Looks good to me, approved
diff --git a/src/southbridge/intel/bd82x6x/pcie.c b/src/southbridge/intel/bd82x6x/pcie.c index 5bc3412..ff881ac 100644 --- a/src/southbridge/intel/bd82x6x/pcie.c +++ b/src/southbridge/intel/bd82x6x/pcie.c @@ -13,6 +13,26 @@ #include "chip.h" #include "pch.h"
+static const char *pch_pcie_acpi_name(const struct device *dev) +{ + ASSERT(dev); + + if (PCI_SLOT(dev->path.pci.devfn) == 0x1c) { + static const char *names[] = { "RP01", + "RP02", + "RP03", + "RP04", + "RP05", + "RP06", + "RP07", + "RP08"}; + + return names[PCI_FUNC(dev->path.pci.devfn)]; + } + + return NULL; +} + static void pch_pcie_pm_early(struct device *dev) { u16 link_width_p0, link_width_p4; @@ -272,26 +292,6 @@ pch_pcie_pm_late(dev); }
-static const char *pch_pcie_acpi_name(const struct device *dev) -{ - ASSERT(dev); - - if (PCI_SLOT(dev->path.pci.devfn) == 0x1c) { - static const char *names[] = { "RP01", - "RP02", - "RP03", - "RP04", - "RP05", - "RP06", - "RP07", - "RP08"}; - - return names[PCI_FUNC(dev->path.pci.devfn)]; - } - - return NULL; -} - static struct device_operations device_ops = { .read_resources = pci_bus_read_resources, .set_resources = pci_dev_set_resources,