From ae390c629f2a10fd6a1c2eb50b7d3510d6e091da Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Mon, 2 Sep 2019 21:26:12 -0700 Subject: arch: Make a base class for Interrupts. That abstracts the ISA further from the CPU, getting us a small step closer to being able to build in more than one ISA at a time. Change-Id: Ibf7e26a3df411ffe994ac1e11d2a53b656863223 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20831 Tested-by: kokoro Reviewed-by: Jason Lowe-Power Reviewed-by: Andreas Sandberg Maintainer: Andreas Sandberg --- src/arch/power/PowerInterrupts.py | 4 ++-- src/arch/power/interrupts.hh | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/arch/power') diff --git a/src/arch/power/PowerInterrupts.py b/src/arch/power/PowerInterrupts.py index 2c6a5c2c3..f7e7e57bb 100644 --- a/src/arch/power/PowerInterrupts.py +++ b/src/arch/power/PowerInterrupts.py @@ -26,9 +26,9 @@ # # Authors: Gabe Black -from m5.SimObject import SimObject +from m5.objects.BaseInterrupts import BaseInterrupts -class PowerInterrupts(SimObject): +class PowerInterrupts(BaseInterrupts): type = 'PowerInterrupts' cxx_class = 'PowerISA::Interrupts' cxx_header = 'arch/power/interrupts.hh' diff --git a/src/arch/power/interrupts.hh b/src/arch/power/interrupts.hh index f89959863..b68cf8742 100644 --- a/src/arch/power/interrupts.hh +++ b/src/arch/power/interrupts.hh @@ -31,16 +31,16 @@ #ifndef __ARCH_POWER_INTERRUPT_HH__ #define __ARCH_POWER_INTERRUPT_HH__ +#include "arch/generic/interrupts.hh" #include "base/logging.hh" #include "params/PowerInterrupts.hh" -#include "sim/sim_object.hh" class BaseCPU; class ThreadContext; namespace PowerISA { -class Interrupts : public SimObject +class Interrupts : public BaseInterrupts { private: BaseCPU * cpu; @@ -54,7 +54,7 @@ class Interrupts : public SimObject return dynamic_cast(_params); } - Interrupts(Params * p) : SimObject(p), cpu(NULL) + Interrupts(Params * p) : BaseInterrupts(p), cpu(NULL) {} void -- cgit v1.2.3