summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2012-05-30 05:31:11 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2012-05-30 05:31:11 -0400
commitb8cf48accc611a09314454d1573ee531f2770264 (patch)
treef18b58416468a7e26fb0669bba98567932decfe9 /src
parent5880fbe96dea23c7b036e2ff9c7dcb4d206402ad (diff)
downloadgem5-b8cf48accc611a09314454d1573ee531f2770264.tar.xz
Bus: Remove redundant packet parameter from isOccupied
This patch merely remove the Packet* from the isOccupied member function. Historically this was used to check if the packet was an express snoop, but this is now done outside this function (where relevant).
Diffstat (limited to 'src')
-rw-r--r--src/mem/bus.cc14
-rw-r--r--src/mem/bus.hh3
2 files changed, 9 insertions, 8 deletions
diff --git a/src/mem/bus.cc b/src/mem/bus.cc
index e2764b63d..a22b0e7fd 100644
--- a/src/mem/bus.cc
+++ b/src/mem/bus.cc
@@ -184,7 +184,7 @@ void Bus::occupyBus(Tick until)
}
bool
-Bus::isOccupied(PacketPtr pkt, Port* port)
+Bus::isOccupied(Port* port)
{
// first we see if the next idle tick is in the future, next the
// bus is considered occupied if there are ports on the retry list
@@ -204,8 +204,8 @@ Bus::recvTimingReq(PacketPtr pkt, PortID slave_port_id)
SlavePort *src_port = slavePorts[slave_port_id];
// test if the bus should be considered occupied for the current
- // packet, and exclude express snoops from the check
- if (!pkt->isExpressSnoop() && isOccupied(pkt, src_port)) {
+ // port, and exclude express snoops from the check
+ if (!pkt->isExpressSnoop() && isOccupied(src_port)) {
DPRINTF(Bus, "recvTimingReq: src %s %s 0x%x BUSY\n",
src_port->name(), pkt->cmdString(), pkt->getAddr());
return false;
@@ -277,8 +277,8 @@ Bus::recvTimingResp(PacketPtr pkt, PortID master_port_id)
MasterPort *src_port = masterPorts[master_port_id];
// test if the bus should be considered occupied for the current
- // packet
- if (isOccupied(pkt, src_port)) {
+ // port
+ if (isOccupied(src_port)) {
DPRINTF(Bus, "recvTimingResp: src %s %s 0x%x BUSY\n",
src_port->name(), pkt->cmdString(), pkt->getAddr());
return false;
@@ -343,7 +343,9 @@ Bus::recvTimingSnoopResp(PacketPtr pkt, PortID slave_port_id)
// determine the source port based on the id
SlavePort* src_port = slavePorts[slave_port_id];
- if (isOccupied(pkt, src_port)) {
+ // test if the bus should be considered occupied for the current
+ // port
+ if (isOccupied(src_port)) {
DPRINTF(Bus, "recvTimingSnoopResp: src %s %s 0x%x BUSY\n",
src_port->name(), pkt->cmdString(), pkt->getAddr());
return false;
diff --git a/src/mem/bus.hh b/src/mem/bus.hh
index dc5051fc2..c35b46cc2 100644
--- a/src/mem/bus.hh
+++ b/src/mem/bus.hh
@@ -259,12 +259,11 @@ class Bus : public MemObject
* presented with a packet from a specific port. If so, the port
* in question is also added to the retry list.
*
- * @param pkt Incoming packet
* @param port Source port on the bus presenting the packet
*
* @return True if the bus is to be considered occupied
*/
- bool isOccupied(PacketPtr pkt, Port* port);
+ bool isOccupied(Port* port);
/**
* Deal with a destination port accepting a packet by potentially