From 935a0009b2e68bf176cde7b31ac059025fba3990 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Wed, 4 Mar 2020 01:46:47 -0800 Subject: [PATCH] mem: Get rid of one more unused Request constructor. Also collapse setPhys, which is private, into the only caller which is the Request constructor which takes a physical address. Change-Id: I872c489cd168d7c364a57e26efce2350a3632c82 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/26230 Tested-by: kokoro Reviewed-by: Nikos Nikoleris Maintainer: Gabe Black --- src/mem/request.hh | 45 ++++++++------------------------------------- 1 file changed, 8 insertions(+), 37 deletions(-) diff --git a/src/mem/request.hh b/src/mem/request.hh index 1d7cc972a9..772dafc946 100644 --- a/src/mem/request.hh +++ b/src/mem/request.hh @@ -281,26 +281,6 @@ class Request private: - /** - * Set up a physical (e.g. device) request in a previously - * allocated Request object. - */ - void - setPhys(Addr paddr, unsigned size, Flags flags, MasterID mid) - { - _paddr = paddr; - _size = size; - _time = curTick(); - _masterId = mid; - _flags.clear(~STICKY_FLAGS); - _flags.set(flags); - privateFlags.clear(~STICKY_PRIVATE_FLAGS); - privateFlags.set(VALID_PADDR|VALID_SIZE); - depth = 0; - accessDelta = 0; - //translateDelta = 0; - } - /** * The physical address of the request. Valid only if validPaddr * is set. @@ -309,8 +289,8 @@ class Request /** * The size of the request. This field must be set when vaddr or - * paddr is written via setVirt() or setPhys(), so it is always - * valid as long as one of the address fields is valid. + * paddr is written via setVirt() or a phys basec constructor, so it is + * always valid as long as one of the address fields is valid. */ unsigned _size = 0; @@ -396,22 +376,16 @@ class Request */ Request() {} - Request(Addr paddr, unsigned size, Flags flags, MasterID mid, - InstSeqNum seq_num, ContextID cid) : _reqInstSeqNum(seq_num) - { - setPhys(paddr, size, flags, mid); - setContext(cid); - privateFlags.set(VALID_INST_SEQ_NUM); - } - /** * Constructor for physical (e.g. device) requests. Initializes * just physical address, size, flags, and timestamp (to curTick()). * These fields are adequate to perform a request. */ - Request(Addr paddr, unsigned size, Flags flags, MasterID mid) + Request(Addr paddr, unsigned size, Flags flags, MasterID mid) : + _paddr(paddr), _size(size), _masterId(mid), _time(curTick()) { - setPhys(paddr, size, flags, mid); + _flags.set(flags); + privateFlags.set(VALID_PADDR|VALID_SIZE); } Request(uint64_t asid, Addr vaddr, unsigned size, Flags flags, @@ -502,11 +476,8 @@ class Request } /** - * Set just the physical address. This usually used to record the - * result of a translation. However, when using virtualized CPUs - * setPhys() is sometimes called to finalize a physical address - * without a virtual address, so we can't check if the virtual - * address is valid. + * Set just the physical address. This usually used to record the + * result of a translation. */ void setPaddr(Addr paddr)