Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32948 )
Change subject: nb/intel/x4x/rcven.c: Remove variable set but not used ......................................................................
Patch Set 1:
(1 comment)
Elyes, wait for others to comment, but I think you can restore this.
https://review.coreboot.org/#/c/32948/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/32948/1//COMMIT_MSG@7 PS1, Line 7: Remove variable set but not used
The whole purpose of this variable is to sample the strobe so it is normal that it does not get used […]
The code used read32() which alone would prevent compiler from optimizing out the MMIO read.
before:
47: 0f ae f0 mfence 4a: 8b 07 mov (%edi),%eax 4c: 89 44 24 1c mov %eax,0x1c(%esp) 50: 0f ae f0 mfence
after:
47: 0f ae f0 mfence 4a: 8b 07 mov (%edi),%eax 4c: 0f ae f0 mfence
I don't see why we would ever need to declare a variable stored on the stack as volatile like the code currently does. I think this fix was correct.