dcache: Fix another dcache bug causing occasional load data corruption
Commitpull/460/heada7420c2a4d("dcache: Fix bug causing load to return incorrect data", 2025-12-27) fixed the main cause of the bug, but left a 1-cycle window where the same problem could still occur. If a touch that misses in the dcache is followed immediately by a load to a different cache line with the same index, then because the touch is completed and the new tag is written for the line being touched in the same cycle, it is possible for the following load to use the previous (stale) tag value for the line. If that old value matches the load (i.e., the load would have been a hit in the absence of the touch) then the load will incorrectly return data from the line being touched. Fix this by delaying the completion of the touch until after the new tag has been written, which is indicated by r1.write_tag = 0. Fixes:a7420c2a4d("dcache: Fix bug causing load to return incorrect data", 2025-12-27) Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
parent
a1d83ba91a
commit
6100e7b50e
Loading…
Reference in New Issue