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 bool keep_trying = false;
143 do {
144 pkt = *pf.begin();
145 pf.pop_front();
146
147 if (keep_trying) {
148 DPRINTF(HWPrefetch, "addr 0x%x in cache, skipping\n",
149 pkt->getAddr());
150 delete pkt->req;
151 delete pkt;
152 }
153
154 if (pf.empty()) {
155 cache->deassertMemSideBusRequest(BaseCache::Request_PF);
156 if (keep_trying) {
157 return NULL; // None left, all were in cache
158 }
159 }
160 } while (keep_trying);
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 ---