fa_lru.cc (12744:d1ff0b42b747) fa_lru.cc (12745:e28c117a9806)
1/*
2 * Copyright (c) 2013,2016-2018 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

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

117 return nullptr;
118}
119
120void
121FALRU::invalidate(CacheBlk *blk)
122{
123 BaseTags::invalidate(blk);
124
1/*
2 * Copyright (c) 2013,2016-2018 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

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

117 return nullptr;
118}
119
120void
121FALRU::invalidate(CacheBlk *blk)
122{
123 BaseTags::invalidate(blk);
124
125 // Decrease the number of tags in use
126 tagsInUse--;
127
125 // Move the block to the tail to make it the next victim
126 moveToTail((FALRUBlk*)blk);
127
128 // Erase block entry in the hash table
129 tagHash.erase(blk->tag);
130}
131
132CacheBlk*

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

164 *in_caches_mask = mask;
165 }
166
167 cacheTracking.recordAccess(blk);
168
169 return blk;
170}
171
128 // Move the block to the tail to make it the next victim
129 moveToTail((FALRUBlk*)blk);
130
131 // Erase block entry in the hash table
132 tagHash.erase(blk->tag);
133}
134
135CacheBlk*

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

167 *in_caches_mask = mask;
168 }
169
170 cacheTracking.recordAccess(blk);
171
172 return blk;
173}
174
172
173CacheBlk*
174FALRU::findBlock(Addr addr, bool is_secure) const
175{
176 Addr tag = extractTag(addr);
177 FALRUBlk* blk = hashLookup(tag);
178
179 if (blk && blk->isValid()) {
180 assert(blk->tag == tag);

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

210 FALRUBlk* falruBlk = static_cast<FALRUBlk*>(blk);
211
212 // Make sure block is not present in the cache
213 assert(falruBlk->inCachesMask == 0);
214
215 // Do common block insertion functionality
216 BaseTags::insertBlock(pkt, blk);
217
175CacheBlk*
176FALRU::findBlock(Addr addr, bool is_secure) const
177{
178 Addr tag = extractTag(addr);
179 FALRUBlk* blk = hashLookup(tag);
180
181 if (blk && blk->isValid()) {
182 assert(blk->tag == tag);

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

212 FALRUBlk* falruBlk = static_cast<FALRUBlk*>(blk);
213
214 // Make sure block is not present in the cache
215 assert(falruBlk->inCachesMask == 0);
216
217 // Do common block insertion functionality
218 BaseTags::insertBlock(pkt, blk);
219
220 // Increment tag counter
221 tagsInUse++;
222
218 // New block is the MRU
219 moveToHead(falruBlk);
220
221 // Insert new block in the hash table
222 tagHash[falruBlk->tag] = falruBlk;
223}
224
225void

--- 225 unchanged lines hidden ---
223 // New block is the MRU
224 moveToHead(falruBlk);
225
226 // Insert new block in the hash table
227 tagHash[falruBlk->tag] = falruBlk;
228}
229
230void

--- 225 unchanged lines hidden ---