From: Steve Reinhardt Date: Wed, 23 Jun 2010 04:29:43 +0000 (-0700) Subject: cache: fix longstanding prefetcher bug X-Git-Tag: stable_2012_02_02~1025 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=de2321de81506a81f64641babe0bce17ab946b9c;p=gem5.git cache: fix longstanding prefetcher bug Thanks to Joe Gross for pointing this out (again?). Apologies to anyone who pointed it out earlier and we didn't listen. --- diff --git a/src/mem/cache/cache_impl.hh b/src/mem/cache/cache_impl.hh index d5eb38e48..8ff11b26f 100644 --- a/src/mem/cache/cache_impl.hh +++ b/src/mem/cache/cache_impl.hh @@ -1308,7 +1308,7 @@ Cache::getNextMSHR() // fall through... no pending requests. Try a prefetch. assert(!miss_mshr && !write_mshr); - if (!mshrQueue.isFull()) { + if (prefetcher && !mshrQueue.isFull()) { // If we have a miss queue slot, we can try a prefetch PacketPtr pkt = prefetcher->getPacket(); if (pkt) {