2c2
< * Copyright (c) 2013-2015 ARM Limited
---
> * Copyright (c) 2013-2016 ARM Limited
68,70c68,70
< // Ultimately we should check if the packet came from an
< // allocating source, not just if the port is snooping
< bool allocate = !cpkt->req->isUncacheable() && slave_port.isSnooping();
---
> // check if the packet came from a cache
> bool allocate = !cpkt->req->isUncacheable() && slave_port.isSnooping() &&
> cpkt->fromCache();
238,241c238,241
< // Ultimately we should check if the packet came from an
< // allocating source, not just if the port is snooping
< bool allocate = !cpkt->req->isUncacheable() && req_port.isSnooping();
< if (!allocate)
---
> // if this snoop response is due to an uncacheable request, or is
> // being turned into a normal response, there is nothing more to
> // do
> if (cpkt->req->isUncacheable() || !req_port.isSnooping()) {
242a243
> }
270a272
> // @todo Deal with invalidating responses
322,325c324,326
< // Ultimately we should check if the packet came from an
< // allocating source, not just if the port is snooping
< bool allocate = !cpkt->req->isUncacheable() && slave_port.isSnooping();
< if (!allocate)
---
> // we only allocate if the packet actually came from a cache, but
> // start by checking if the port is snooping
> if (cpkt->req->isUncacheable() || !slave_port.isSnooping())
327a329
> // next check if we actually allocated an entry
328a331,334
> auto sf_it = cachedLocations.find(line_addr);
> if (sf_it == cachedLocations.end())
> return;
>
330c336
< SnoopItem& sf_item = cachedLocations[line_addr];
---
> SnoopItem& sf_item = sf_it->second;