From c9c2d979b8c505d0013beb4b4b3e1885963e8d39 Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Fri, 19 Aug 2011 15:08:08 -0500 Subject: [PATCH] Mem: Put prefetcher notify call before packet is deleted. --- src/mem/cache/cache_impl.hh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mem/cache/cache_impl.hh b/src/mem/cache/cache_impl.hh index e9a40a741..b29d52f78 100644 --- a/src/mem/cache/cache_impl.hh +++ b/src/mem/cache/cache_impl.hh @@ -514,18 +514,18 @@ Cache::timingAccess(PacketPtr pkt) bool needsResponse = pkt->needsResponse(); if (satisfied) { + if (prefetcher && (prefetchOnAccess || (blk && blk->wasPrefetched()))) { + if (blk) + blk->status &= ~BlkHWPrefetched; + next_pf_time = prefetcher->notify(pkt, time); + } + if (needsResponse) { pkt->makeTimingResponse(); cpuSidePort->respond(pkt, curTick()+lat); } else { delete pkt; } - - if (prefetcher && (prefetchOnAccess || (blk && blk->wasPrefetched()))) { - if (blk) - blk->status &= ~BlkHWPrefetched; - next_pf_time = prefetcher->notify(pkt, time); - } } else { // miss