Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42074 )
Change subject: [WIP] soc/amd/common: Avoid MMIO aliasing on SMBus ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/42074/2/src/soc/amd/common/block/sm... File src/soc/amd/common/block/smbus/smbus.c:
https://review.coreboot.org/c/coreboot/+/42074/2/src/soc/amd/common/block/sm... PS2, Line 23: return controller->reg8[reg];
What's the reasoning for not using read8()? pointer aliasing rules?
Aliasing rules hit on every writeX() but for symmetry I avoid readX() here. Sequences where one does multiple MMIO writes with small offsets from same base produce a lot prettier code without writeX().