Deleted Added
sdiff udiff text old ( 11544:2383451ff6a5 ) new ( 11603:900cca8c5b04 )
full compact
1/*
2 * Copyright (c) 2013-2015 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

--- 49 unchanged lines hidden (view full) ---

60}
61
62std::pair<SnoopFilter::SnoopList, Cycles>
63SnoopFilter::lookupRequest(const Packet* cpkt, const SlavePort& slave_port)
64{
65 DPRINTF(SnoopFilter, "%s: packet src %s addr 0x%x cmd %s\n",
66 __func__, slave_port.name(), cpkt->getAddr(), cpkt->cmdString());
67
68 // Ultimately we should check if the packet came from an
69 // allocating source, not just if the port is snooping
70 bool allocate = !cpkt->req->isUncacheable() && slave_port.isSnooping();
71 Addr line_addr = cpkt->getBlockAddr(linesize);
72 SnoopMask req_port = portToMask(slave_port);
73 reqLookupResult = cachedLocations.find(line_addr);
74 bool is_hit = (reqLookupResult != cachedLocations.end());
75
76 // If the snoop filter has no entry, and we should not allocate,
77 // do not create a new snoop filter entry, simply return a NULL
78 // portlist.

--- 151 unchanged lines hidden (view full) ---

230{
231 DPRINTF(SnoopFilter, "%s: packet rsp %s req %s addr 0x%x cmd %s\n",
232 __func__, rsp_port.name(), req_port.name(), cpkt->getAddr(),
233 cpkt->cmdString());
234
235 assert(cpkt->isResponse());
236 assert(cpkt->cacheResponding());
237
238 // Ultimately we should check if the packet came from an
239 // allocating source, not just if the port is snooping
240 bool allocate = !cpkt->req->isUncacheable() && req_port.isSnooping();
241 if (!allocate)
242 return;
243
244 Addr line_addr = cpkt->getBlockAddr(linesize);
245 SnoopMask rsp_mask = portToMask(rsp_port);
246 SnoopMask req_mask = portToMask(req_port);
247 SnoopItem& sf_item = cachedLocations[line_addr];
248
249 DPRINTF(SnoopFilter, "%s: old SF value %x.%x\n",
250 __func__, sf_item.requested, sf_item.holder);

--- 12 unchanged lines hidden (view full) ---

263 if (!cpkt->hasSharers()) {
264 DPRINTF(SnoopFilter,
265 "%s: dropping %x because non-shared snoop "
266 "response SF val: %x.%x\n", __func__, rsp_mask,
267 sf_item.requested, sf_item.holder);
268 sf_item.holder = 0;
269 }
270 assert(!cpkt->isWriteback());
271 sf_item.holder |= req_mask;
272 sf_item.requested &= ~req_mask;
273 assert(sf_item.requested | sf_item.holder);
274 DPRINTF(SnoopFilter, "%s: new SF value %x.%x\n",
275 __func__, sf_item.requested, sf_item.holder);
276}
277
278void

--- 35 unchanged lines hidden (view full) ---

314void
315SnoopFilter::updateResponse(const Packet* cpkt, const SlavePort& slave_port)
316{
317 DPRINTF(SnoopFilter, "%s: packet src %s addr 0x%x cmd %s\n",
318 __func__, slave_port.name(), cpkt->getAddr(), cpkt->cmdString());
319
320 assert(cpkt->isResponse());
321
322 // Ultimately we should check if the packet came from an
323 // allocating source, not just if the port is snooping
324 bool allocate = !cpkt->req->isUncacheable() && slave_port.isSnooping();
325 if (!allocate)
326 return;
327
328 Addr line_addr = cpkt->getBlockAddr(linesize);
329 SnoopMask slave_mask = portToMask(slave_port);
330 SnoopItem& sf_item = cachedLocations[line_addr];
331
332 DPRINTF(SnoopFilter, "%s: old SF value %x.%x\n",
333 __func__, sf_item.requested, sf_item.holder);
334
335 // Make sure we have seen the actual request, too
336 panic_if(!(sf_item.requested & slave_mask), "SF value %x.%x missing "\
337 "request bit\n", sf_item.requested, sf_item.holder);
338

--- 51 unchanged lines hidden ---