changeset cbe7d60037f3 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=cbe7d60037f3
description:
        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:

 src/mem/bus.cc |  14 ++++++++------
 src/mem/bus.hh |   3 +--
 2 files changed, 9 insertions(+), 8 deletions(-)

diffs (62 lines):

diff -r 42dfc00ee1a1 -r cbe7d60037f3 src/mem/bus.cc
--- a/src/mem/bus.cc    Wed May 30 05:30:24 2012 -0400
+++ b/src/mem/bus.cc    Wed May 30 05:31:11 2012 -0400
@@ -184,7 +184,7 @@
 }
 
 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 @@
     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 @@
     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 @@
     // 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 -r 42dfc00ee1a1 -r cbe7d60037f3 src/mem/bus.hh
--- a/src/mem/bus.hh    Wed May 30 05:30:24 2012 -0400
+++ b/src/mem/bus.hh    Wed May 30 05:31:11 2012 -0400
@@ -259,12 +259,11 @@
      * 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
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to