arch,cpu: Change setCPU to setThreadContext in Interrupts.
authorGabe Black <gabeblack@google.com>
Tue, 12 May 2020 20:09:23 +0000 (13:09 -0700)
committerGabe Black <gabeblack@google.com>
Thu, 11 Jun 2020 23:42:54 +0000 (23:42 +0000)
commitbd9fb891225bdcd6b2896303458c092ce3a92902
tree5090037a0c1bb3e2c2c7fb82a3c9b491ad0c5c9b
parent432ecdfbdcdf9316dcd2daabc79db2f27b72960b
arch,cpu: Change setCPU to setThreadContext in Interrupts.

The ThreadContext can be used to access the cpu if needed, and is a
more representative interface to various pieces of state than the CPU
itself. Also convert some of the methods in Interupts to use the
locally stored ThreadContext pointer instead of taking one as an
argument. This makes calling those methods simpler and less error
prone.

Change-Id: I740bd99f92e54e052a618a4ae2927ea1c4ece193
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/28988
Reviewed-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
19 files changed:
src/arch/arm/interrupts.cc
src/arch/arm/interrupts.hh
src/arch/arm/isa/insts/misc.isa
src/arch/generic/interrupts.hh
src/arch/mips/interrupts.cc
src/arch/mips/interrupts.hh
src/arch/power/interrupts.hh
src/arch/riscv/interrupts.hh
src/arch/sparc/interrupts.hh
src/arch/x86/interrupts.cc
src/arch/x86/interrupts.hh
src/cpu/base.cc
src/cpu/base.hh
src/cpu/intr_control.cc
src/cpu/kvm/x86_cpu.cc
src/cpu/minor/execute.cc
src/cpu/o3/commit_impl.hh
src/cpu/o3/cpu.cc
src/cpu/simple/base.cc