From f790f34fe30aaca22b829104a8cf3f547624132a Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Sun, 15 Jul 2007 20:09:03 -0700 Subject: Make Bus::findPort() a little more useful. Move check for loops outside, since half the call sites end up working around it anyway. Return integer port ID instead of port object pointer. --HG-- extra : convert_revision : 4c31fe9930f4d1aa4919e764efb7c50d43792ea3 --- src/mem/bus.hh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/mem/bus.hh') diff --git a/src/mem/bus.hh b/src/mem/bus.hh index bd51337ed..a19420244 100644 --- a/src/mem/bus.hh +++ b/src/mem/bus.hh @@ -176,11 +176,9 @@ class Bus : public MemObject /** Find which port connected to this bus (if any) should be given a packet * with this address. * @param addr Address to find port for. - * @param id Id of the port this packet was received from (to prevent - * loops) - * @return pointer to port that the packet should be sent out of. + * @return id of port that the packet should be sent out of. */ - Port *findPort(Addr addr, int id); + int findPort(Addr addr); /** Snoop all relevant ports functionally. */ void functionalSnoop(PacketPtr pkt, Port *responder); -- cgit v1.2.3