From 7b48b38a92a10ae1e8369fbbd2f5978ca728a663 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Mon, 2 Mar 2020 16:46:12 -0800 Subject: [PATCH] mem: Remove the version of the FS translating port proxy with no tc. This version is not used and is the only remaining consumer of the vtophys variant with no ThreadContext. Change-Id: I8cb870b841fe064cee121e4930cb163d2ec7628f Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/26223 Reviewed-by: Nikos Nikoleris Maintainer: Gabe Black Tested-by: kokoro --- src/mem/fs_translating_port_proxy.cc | 30 +++------------------------- src/mem/fs_translating_port_proxy.hh | 6 ------ 2 files changed, 3 insertions(+), 33 deletions(-) diff --git a/src/mem/fs_translating_port_proxy.cc b/src/mem/fs_translating_port_proxy.cc index aaa86560f..ea62fe65d 100644 --- a/src/mem/fs_translating_port_proxy.cc +++ b/src/mem/fs_translating_port_proxy.cc @@ -57,29 +57,13 @@ FSTranslatingPortProxy::FSTranslatingPortProxy(ThreadContext *tc) { } -FSTranslatingPortProxy::FSTranslatingPortProxy( - SendFunctionalFunc func, unsigned int cacheLineSize) - : PortProxy(func, cacheLineSize), _tc(NULL) -{ -} - -FSTranslatingPortProxy::FSTranslatingPortProxy( - MasterPort &port, unsigned int cacheLineSize) - : PortProxy(port, cacheLineSize), _tc(NULL) -{ -} - bool FSTranslatingPortProxy::tryReadBlob(Addr addr, void *p, int size) const { - Addr paddr; for (ChunkGenerator gen(addr, size, TheISA::PageBytes); !gen.done(); gen.next()) { - if (_tc) - paddr = TheISA::vtophys(_tc,gen.addr()); - else - paddr = TheISA::vtophys(gen.addr()); + Addr paddr = TheISA::vtophys(_tc, gen.addr()); PortProxy::readBlobPhys(paddr, 0, p, gen.size()); p = static_cast(p) + gen.size(); @@ -91,14 +75,10 @@ bool FSTranslatingPortProxy::tryWriteBlob( Addr addr, const void *p, int size) const { - Addr paddr; for (ChunkGenerator gen(addr, size, TheISA::PageBytes); !gen.done(); gen.next()) { - if (_tc) - paddr = TheISA::vtophys(_tc,gen.addr()); - else - paddr = TheISA::vtophys(gen.addr()); + Addr paddr = TheISA::vtophys(_tc, gen.addr()); PortProxy::writeBlobPhys(paddr, 0, p, gen.size()); p = static_cast(p) + gen.size(); @@ -109,14 +89,10 @@ FSTranslatingPortProxy::tryWriteBlob( bool FSTranslatingPortProxy::tryMemsetBlob(Addr address, uint8_t v, int size) const { - Addr paddr; for (ChunkGenerator gen(address, size, TheISA::PageBytes); !gen.done(); gen.next()) { - if (_tc) - paddr = TheISA::vtophys(_tc,gen.addr()); - else - paddr = TheISA::vtophys(gen.addr()); + Addr paddr = TheISA::vtophys(_tc, gen.addr()); PortProxy::memsetBlobPhys(paddr, 0, v, gen.size()); } diff --git a/src/mem/fs_translating_port_proxy.hh b/src/mem/fs_translating_port_proxy.hh index fd1a331e3..c1c4339b9 100644 --- a/src/mem/fs_translating_port_proxy.hh +++ b/src/mem/fs_translating_port_proxy.hh @@ -75,12 +75,6 @@ class FSTranslatingPortProxy : public PortProxy public: FSTranslatingPortProxy(ThreadContext* tc); - - FSTranslatingPortProxy(SendFunctionalFunc func, - unsigned int cacheLineSize); - FSTranslatingPortProxy(MasterPort &port, - unsigned int cacheLineSize); - ~FSTranslatingPortProxy() {} /** Version of tryReadblob that translates virt->phys and deals -- 2.30.2