From 6a7a5b30050d10a7d9cc9cd5614988871253298d Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Wed, 29 Jan 2020 15:41:59 -0800 Subject: arch,sim: Merge initCPU and startupCPU. These two functions were called in exactly one place one right after the other, and served similar purposes. This change merges them together, and cleans them up slightly. It also removes checks for FullSystem, since those functions are only called in full system to begin with. Change-Id: I214f7d2d3f88960dccb5895c1241f61cd78716a8 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24904 Reviewed-by: Gabe Black Maintainer: Gabe Black Tested-by: kokoro --- src/arch/riscv/utility.cc | 6 +++--- src/arch/riscv/utility.hh | 5 ----- 2 files changed, 3 insertions(+), 8 deletions(-) (limited to 'src/arch/riscv') diff --git a/src/arch/riscv/utility.cc b/src/arch/riscv/utility.cc index 6e21a0484..949d7c66f 100644 --- a/src/arch/riscv/utility.cc +++ b/src/arch/riscv/utility.cc @@ -37,8 +37,8 @@ namespace RiscvISA void initCPU(ThreadContext *tc, int cpuId) { - static Fault reset = std::make_shared(); - reset->invoke(tc); + Reset().invoke(tc); + tc->activate(); } -} \ No newline at end of file +} diff --git a/src/arch/riscv/utility.hh b/src/arch/riscv/utility.hh index 6c0fcc130..f6e1f348a 100644 --- a/src/arch/riscv/utility.hh +++ b/src/arch/riscv/utility.hh @@ -117,11 +117,6 @@ getArgument(ThreadContext *tc, int &number, uint16_t size, bool fp) return 0; } -inline void startupCPU(ThreadContext *tc, int cpuId) -{ - tc->activate(); -} - inline void copyRegs(ThreadContext *src, ThreadContext *dest) { -- cgit v1.2.3