Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42074 )
Change subject: soc/amd/common: Refactor SMBus base arguments ......................................................................
Patch Set 12:
(3 comments)
https://review.coreboot.org/c/coreboot/+/42074/10/src/soc/amd/common/block/s... File src/soc/amd/common/block/smbus/smbus.c:
https://review.coreboot.org/c/coreboot/+/42074/10/src/soc/amd/common/block/s... PS10, Line 15: union reg_bank { : uint8_t reg8[0x100]; : uint16_t reg16[0x100 / sizeof(uint16_t)]; : };
It's a strange compiler optimisation topic indeed. […]
With the base address passed on the stack now, this does not seem to happen.
Previously, the code accessed global acpimmio_smbus and _asf so it happened.
https://review.coreboot.org/c/coreboot/+/42074/10/src/soc/amd/common/block/s... PS10, Line 23: controller->reg8[reg];
read8()
Done
https://review.coreboot.org/c/coreboot/+/42074/10/src/soc/amd/common/block/s... PS10, Line 29: controller->reg8[reg] = val
write8()
Done