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

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

252 // The source should have the line
253 panic_if(!(sf_item.holder & rsp_mask), "SF value %x.%x does not have "\
254 "the line\n", sf_item.requested, sf_item.holder);
255
256 // The destination should have had a request in
257 panic_if(!(sf_item.requested & req_mask), "SF value %x.%x missing "\
258 "the original request\n", sf_item.requested, sf_item.holder);
259
260 // Update the residency of the cache line.
261 if (cpkt->needsWritable() || !cpkt->hasSharers()) {
262 DPRINTF(SnoopFilter, "%s: dropping %x because needs: %i writable: %i "\
263 "SF val: %x.%x\n", __func__, rsp_mask,
264 cpkt->needsWritable(), !cpkt->hasSharers(),
260 // If the snoop response has no sharers the line is passed in
261 // Modified state, and we know that there are no other copies, or
262 // they will all be invalidated imminently
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);
266
267 sf_item.holder &= ~rsp_mask;
268 // The snoop filter does not see any ACKs from non-responding sharers
269 // that have been invalidated :( So below assert would be nice, but..
270 //assert(sf_item.holder == 0);
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);

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

294 if (!is_hit)
295 return;
296
297 SnoopItem& sf_item = sf_it->second;
298
299 DPRINTF(SnoopFilter, "%s: old SF value %x.%x\n",
300 __func__, sf_item.requested, sf_item.holder);
301
305 // Remote (to this snoop filter) snoops update the filter
306 // already when they arrive from below, because we may not see
307 // any response.
308 if (cpkt->needsWritable()) {
309 // If the request to this snoop response hit an in-flight
310 // transaction,
311 // the holder was not reset -> no assertion & do that here, now!
312 //assert(sf_item.holder == 0);
302 // If the snoop response has no sharers the line is passed in
303 // Modified state, and we know that there are no other copies, or
304 // they will all be invalidated imminently
305 if (!cpkt->hasSharers()) {
306 sf_item.holder = 0;
307 }
308 DPRINTF(SnoopFilter, "%s: new SF value %x.%x\n",
309 __func__, sf_item.requested, sf_item.holder);
310 eraseIfNullEntry(sf_it);
311
312}
313

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

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
346 // Update the residency of the cache line. Here we assume that the
347 // line has been zapped in all caches that are not the responder.
348 if (cpkt->needsWritable() || !cpkt->hasSharers())
339 // Update the residency of the cache line. If the response has no
340 // sharers we know that the line has been invalidated in all
341 // branches that are not where we are responding to.
342 if (!cpkt->hasSharers())
343 sf_item.holder = 0;
344 sf_item.holder |= slave_mask;
345 sf_item.requested &= ~slave_mask;
346 assert(sf_item.holder | sf_item.requested);
347 DPRINTF(SnoopFilter, "%s: new SF value %x.%x\n",
348 __func__, sf_item.requested, sf_item.holder);
349}
350

--- 37 unchanged lines hidden ---