1/* 2 * Copyright (c) 2013-2017,2019 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 --- 192 unchanged lines hidden (view full) --- 201 // If the snoop filter has no entry, simply return a NULL 202 // portlist, there is no point creating an entry only to remove it 203 // later 204 if (!is_hit) 205 return snoopDown(lookupLatency); 206 207 SnoopItem& sf_item = sf_it->second; 208 |
209 SnoopMask interested = (sf_item.holder | sf_item.requested); 210 211 totSnoops++; 212 213 if (interested.count() == 1) 214 hitSingleSnoops++; 215 else 216 hitMultiSnoops++; --- 7 unchanged lines hidden (view full) --- 224 // caches down to the specified point of reference. 225 assert(cpkt->isWriteback() || cpkt->req->isUncacheable() || 226 (cpkt->isInvalidate() == cpkt->needsWritable()) || 227 cpkt->req->isCacheMaintenance()); 228 if (cpkt->isInvalidate() && sf_item.requested.none()) { 229 // Early clear of the holder, if no other request is currently going on 230 // @todo: This should possibly be updated even though we do not filter 231 // upward snoops |
232 DPRINTF(SnoopFilter, "%s: old SF value %x.%x\n", 233 __func__, sf_item.requested, sf_item.holder); |
234 sf_item.holder = 0; |
235 DPRINTF(SnoopFilter, "%s: new SF value %x.%x\n", 236 __func__, sf_item.requested, sf_item.holder); 237 eraseIfNullEntry(sf_it); |
238 } 239 |
240 return snoopSelected(maskToPortList(interested), lookupLatency); 241} 242 243void 244SnoopFilter::updateSnoopResponse(const Packet* cpkt, 245 const SlavePort& rsp_port, 246 const SlavePort& req_port) 247{ --- 65 unchanged lines hidden (view full) --- 313 } 314 auto sf_it = cachedLocations.find(line_addr); 315 bool is_hit = sf_it != cachedLocations.end(); 316 317 // Nothing to do if it is not a hit 318 if (!is_hit) 319 return; 320 |
321 // If the snoop response has no sharers the line is passed in 322 // Modified state, and we know that there are no other copies, or 323 // they will all be invalidated imminently 324 if (!cpkt->hasSharers()) { |
325 SnoopItem& sf_item = sf_it->second; 326 327 DPRINTF(SnoopFilter, "%s: old SF value %x.%x\n", 328 __func__, sf_item.requested, sf_item.holder); |
329 sf_item.holder = 0; |
330 DPRINTF(SnoopFilter, "%s: new SF value %x.%x\n", 331 __func__, sf_item.requested, sf_item.holder); |
332 |
333 eraseIfNullEntry(sf_it); 334 } |
335} 336 337void 338SnoopFilter::updateResponse(const Packet* cpkt, const SlavePort& slave_port) 339{ 340 DPRINTF(SnoopFilter, "%s: src %s packet %s\n", 341 __func__, slave_port.name(), cpkt->print()); 342 --- 86 unchanged lines hidden --- |