From 40e4453ddc9ddbf5b3b949c98e2d3281cf3e97f2 Mon Sep 17 00:00:00 2001 From: Nikos Nikoleris Date: Mon, 20 Jun 2016 15:11:18 +0100 Subject: mem: Fix the snoop filter when there is a downstream addr mapper The snoop filter handles requests in two steps which preceed and follow the call to send the packet downstream. An address mapper could possibly change the address of the packet when it is sent downstream breaking the snoop filter assumption that the address is unchanged Change-Id: Ib2db755e9ebef4f2f7c0169a46b1b11185ffbe79 Reviewed-by: Andreas Sandberg --- src/mem/snoop_filter.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mem/snoop_filter.cc') diff --git a/src/mem/snoop_filter.cc b/src/mem/snoop_filter.cc index 9e8f8afb8..636861c2b 100755 --- a/src/mem/snoop_filter.cc +++ b/src/mem/snoop_filter.cc @@ -146,12 +146,12 @@ SnoopFilter::lookupRequest(const Packet* cpkt, const SlavePort& slave_port) } void -SnoopFilter::finishRequest(bool will_retry, const Packet* cpkt) +SnoopFilter::finishRequest(bool will_retry, const Addr addr) { if (reqLookupResult != cachedLocations.end()) { // since we rely on the caller, do a basic check to ensure // that finishRequest is being called following lookupRequest - assert(reqLookupResult->first == cpkt->getBlockAddr(linesize)); + assert(reqLookupResult->first == (addr & ~(Addr(linesize - 1)))); if (will_retry) { // Undo any changes made in lookupRequest to the snoop filter // entry if the request will come again. retryItem holds -- cgit v1.2.3