1/*
2 * Copyright (c) 2012-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

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

268}
269
270/*
271 * Adds a target to an MSHR
272 */
273void
274MSHR::allocateTarget(PacketPtr pkt, Tick whenReady, Counter _order)
275{
276 // assume we'd never issue a prefetch when we've got an
277 // outstanding miss
278 assert(pkt->cmd != MemCmd::HardPFReq);
279
280 // uncacheable accesses always allocate a new MSHR, and cacheable
281 // accesses ignore any uncacheable MSHRs, thus we should never
282 // have targets addded if originally allocated uncacheable
283 assert(!_isUncacheable);
284
285 // if there's a request already in service for this MSHR, we will
286 // have to defer the new target until after the response if any of
287 // the following are true:
288 // - there are other targets already deferred
289 // - there's a pending invalidate to be applied after the response
290 // comes back (but before this target is processed)
291 // - this target requires an exclusive block and either we're not
292 // getting an exclusive block back or we have already snooped
293 // another read request that will downgrade our exclusive block
294 // to shared
286
287 // assume we'd never issue a prefetch when we've got an
288 // outstanding miss
289 assert(pkt->cmd != MemCmd::HardPFReq);
290
295 if (inService &&
296 (!deferredTargets.empty() || hasPostInvalidate() ||
297 (pkt->needsExclusive() &&
298 (!isPendingDirty() || hasPostDowngrade() || isForward)))) {
299 // need to put on deferred list
300 if (hasPostInvalidate())
301 replaceUpgrade(pkt);
302 deferredTargets.add(pkt, whenReady, _order, Target::FromCPU, true);

--- 185 unchanged lines hidden ---