dcache: Fix stalls that occurred occasionally with dcbt followed by ld
This fixes a race condition that causes a hang in a situation where the program does a dcbt to a cache line, then hits a TLB miss causing some requests to come in to the dcache from the MMU while the cache line requested by the dcbt has not yet started to come in, then does a load to an address in the same cache line requested by the dcbt. If it happens that the data for the load arrives in the same cycle that the load is doing the cache tag and TLB lookups, the dcache_slow process correctly recognizes that the request can be satisfied immediately but incorrectly sends the done signal to the MMU rather than loadstore1, because the logic looks at r1.mmu_req not req.mmu_req. Fix it to use req.mmu_req. Also make sure that RELOAD_WAIT_ACK state only completes a touch that was the one that caused entry to RELOAD_WAIT_ACK state, not a subsequent touch, which will have r1.req.hit_reload = 0. (A touch to the same line that is already being reloaded would be treated as a hit.) Signed-off-by: Paul Mackerras <paulus@ozlabs.org>pull/459/head
parent
fdd98d88d4
commit
6eaf22ea95
Loading…
Reference in New Issue