Deleted Added
sdiff udiff text old ( 8232:b28d06a175be ) new ( 8509:afb40c3d4ba6 )
full compact
1/*
2 * Copyright (c) 2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

134 DPRINTF(HWPrefetch, "Requesting a hw_pf to issue\n");
135
136 if (pf.empty()) {
137 DPRINTF(HWPrefetch, "No HW_PF found\n");
138 return NULL;
139 }
140
141 PacketPtr pkt;
142 while (!pf.empty()) {
143 pkt = *pf.begin();
144 pf.pop_front();
145
146 Addr blk_addr = pkt->getAddr() & ~(Addr)(blkSize-1);
147
148 if (!inCache(blk_addr) && !inMissQueue(blk_addr))
149 // we found a prefetch, return it
150 break;
151
152 DPRINTF(HWPrefetch, "addr 0x%x in cache, skipping\n", pkt->getAddr());
153 delete pkt->req;
154 delete pkt;
155
156 if (pf.empty()) {
157 cache->deassertMemSideBusRequest(BaseCache::Request_PF);
158 return NULL; // None left, all were in cache
159 }
160 }
161
162 pfIssued++;
163 assert(pkt != NULL);
164 DPRINTF(HWPrefetch, "returning 0x%x\n", pkt->getAddr());
165 return pkt;
166}
167
168

--- 110 unchanged lines hidden ---