Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/18432

Change subject: cpu: Remove hwrei from the generic interfaces.
......................................................................

cpu: Remove hwrei from the generic interfaces.

This mechanism is specific to Alpha and doesn't belong sprinkled around
the CPU's generic mechanisms.

Change-Id: I87904d1a08df2b03eb770205e2c4b94db25201a1
---
M src/arch/alpha/ev5.cc
M src/cpu/checker/cpu.hh
M src/cpu/exec_context.hh
M src/cpu/minor/exec_context.hh
M src/cpu/o3/cpu.cc
M src/cpu/o3/cpu.hh
M src/cpu/o3/dyn_inst.hh
M src/cpu/o3/dyn_inst_impl.hh
M src/cpu/simple/exec_context.hh
M src/cpu/simple_thread.cc
M src/cpu/simple_thread.hh
11 files changed, 0 insertions(+), 97 deletions(-)



diff --git a/src/arch/alpha/ev5.cc b/src/arch/alpha/ev5.cc
index bac8e8d..8b7691a 100644
--- a/src/arch/alpha/ev5.cc
+++ b/src/arch/alpha/ev5.cc
@@ -482,25 +482,6 @@

 using namespace AlphaISA;

-Fault
-SimpleThread::hwrei()
-{
-    PCState pc = pcState();
-    if (!(pc.pc() & 0x3))
-        return std::make_shared<UnimplementedOpcodeFault>();
-
-    pc.npc(readMiscRegNoEffect(IPR_EXC_ADDR));
-    pcState(pc);
-
-    CPA::cpa()->swAutoBegin(this, pc.npc());
-
-    if (kernelStats)
-        kernelStats->hwrei();
-
-    // FIXME: XXX check for interrupts? XXX
-    return NoFault;
-}
-
 /**
  * Check for special simulator handling of specific PAL calls.
  * If return value is false, actual PAL call will be suppressed.
diff --git a/src/cpu/checker/cpu.hh b/src/cpu/checker/cpu.hh
index 5f830d7..3f374e8 100644
--- a/src/cpu/checker/cpu.hh
+++ b/src/cpu/checker/cpu.hh
@@ -554,7 +554,6 @@
     void setStCondFailures(unsigned int sc_failures) override {}
     /////////////////////////////////////////////////////

-    Fault hwrei() override { return thread->hwrei(); }
     bool simPalCheck(int palFunc) override
     { return thread->simPalCheck(palFunc); }
     void wakeup(ThreadID tid) override { }
diff --git a/src/cpu/exec_context.hh b/src/cpu/exec_context.hh
index d46cc13..e2c6dd6 100644
--- a/src/cpu/exec_context.hh
+++ b/src/cpu/exec_context.hh
@@ -315,12 +315,6 @@
      */

     /**
-     * Somewhat Alpha-specific function that handles returning from an
-     * error or interrupt.
-     */
-    virtual Fault hwrei() = 0;
-
-    /**
      * Check for special simulator handling of specific PAL calls.  If
      * return value is false, actual PAL call will be suppressed.
      */
diff --git a/src/cpu/minor/exec_context.hh b/src/cpu/minor/exec_context.hh
index 02b3dae..22c6432 100644
--- a/src/cpu/minor/exec_context.hh
+++ b/src/cpu/minor/exec_context.hh
@@ -365,16 +365,6 @@
         return thread.setMiscReg(reg.index(), val);
     }

-    Fault
-    hwrei() override
-    {
-#if THE_ISA == ALPHA_ISA
-        return thread.hwrei();
-#else
-        return NoFault;
-#endif
-    }
-
     bool
     simPalCheck(int palFunc) override
     {
diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc
index 621a6a4..bec4244 100644
--- a/src/cpu/o3/cpu.cc
+++ b/src/cpu/o3/cpu.cc
@@ -918,21 +918,6 @@
 }

 template <class Impl>
-Fault
-FullO3CPU<Impl>::hwrei(ThreadID tid)
-{
-#if THE_ISA == ALPHA_ISA
-    // Need to clear the lock flag upon returning from an interrupt.
-    this->setMiscRegNoEffect(AlphaISA::MISCREG_LOCKFLAG, false, tid);
-
-    this->thread[tid]->kernelStats->hwrei();
-
-    // FIXME: XXX check for interrupts? XXX
-#endif
-    return NoFault;
-}
-
-template <class Impl>
 bool
 FullO3CPU<Impl>::simPalCheck(int palFunc, ThreadID tid)
 {
diff --git a/src/cpu/o3/cpu.hh b/src/cpu/o3/cpu.hh
index 21cae44..11b5f18 100644
--- a/src/cpu/o3/cpu.hh
+++ b/src/cpu/o3/cpu.hh
@@ -386,9 +386,6 @@
     /** Traps to handle given fault. */
     void trap(const Fault &fault, ThreadID tid, const StaticInstPtr &inst);

-    /** HW return from error interrupt. */
-    Fault hwrei(ThreadID tid);
-
     bool simPalCheck(int palFunc, ThreadID tid);

     /** Check if a change in renaming is needed for vector registers.
diff --git a/src/cpu/o3/dyn_inst.hh b/src/cpu/o3/dyn_inst.hh
index 24c59a2..6bb8e2d 100644
--- a/src/cpu/o3/dyn_inst.hh
+++ b/src/cpu/o3/dyn_inst.hh
@@ -248,8 +248,6 @@
             }
         }
     }
-    /** Calls hardware return from error interrupt. */
-    Fault hwrei() override;
     /** Traps to handle specified fault. */
     void trap(const Fault &fault);
     bool simPalCheck(int palFunc) override;
diff --git a/src/cpu/o3/dyn_inst_impl.hh b/src/cpu/o3/dyn_inst_impl.hh
index 03437a5..5fb5973 100644
--- a/src/cpu/o3/dyn_inst_impl.hh
+++ b/src/cpu/o3/dyn_inst_impl.hh
@@ -185,34 +185,6 @@
 }

 template <class Impl>
-Fault
-BaseO3DynInst<Impl>::hwrei()
-{
-#if THE_ISA == ALPHA_ISA
-    // Can only do a hwrei when in pal mode.
-    if (!(this->instAddr() & 0x3))
-        return std::make_shared<AlphaISA::UnimplementedOpcodeFault>();
-
-    // Set the next PC based on the value of the EXC_ADDR IPR.
-    AlphaISA::PCState pc = this->pcState();
-    pc.npc(this->cpu->readMiscRegNoEffect(AlphaISA::IPR_EXC_ADDR,
-                                          this->threadNumber));
-    this->pcState(pc);
-    if (CPA::available()) {
-        ThreadContext *tc = this->cpu->tcBase(this->threadNumber);
-        CPA::cpa()->swAutoBegin(tc, this->nextInstAddr());
-    }
-
-    // Tell CPU to clear any state it needs to if a hwrei is taken.
-    this->cpu->hwrei(this->threadNumber);
-#else
-
-#endif
-    // FIXME: XXX check for interrupts? XXX
-    return NoFault;
-}
-
-template <class Impl>
 void
 BaseO3DynInst<Impl>::trap(const Fault &fault)
 {
diff --git a/src/cpu/simple/exec_context.hh b/src/cpu/simple/exec_context.hh
index de5cc7f..fa6c17f 100644
--- a/src/cpu/simple/exec_context.hh
+++ b/src/cpu/simple/exec_context.hh
@@ -503,12 +503,6 @@
     ThreadContext *tcBase() override { return thread->getTC(); }

     /**
-     * Somewhat Alpha-specific function that handles returning from an
-     * error or interrupt.
-     */
-    Fault hwrei() override { return thread->hwrei(); }
-
-    /**
      * Check for special simulator handling of specific PAL calls.  If
      * return value is false, actual PAL call will be suppressed.
      */
diff --git a/src/cpu/simple_thread.cc b/src/cpu/simple_thread.cc
index 7fee8dd..b676b04 100644
--- a/src/cpu/simple_thread.cc
+++ b/src/cpu/simple_thread.cc
@@ -216,11 +216,6 @@
 // The following methods are defined in src/arch/alpha/ev5.cc for
 // Alpha.
 #if THE_ISA != ALPHA_ISA
-Fault
-SimpleThread::hwrei()
-{
-    return NoFault;
-}

 bool
 SimpleThread::simPalCheck(int palFunc)
diff --git a/src/cpu/simple_thread.hh b/src/cpu/simple_thread.hh
index 0d415dc..d74bd11 100644
--- a/src/cpu/simple_thread.hh
+++ b/src/cpu/simple_thread.hh
@@ -183,8 +183,6 @@

     void dumpFuncProfile() override;

-    Fault hwrei();
-
     bool simPalCheck(int palFunc);

     /*******************************************

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/18432
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I87904d1a08df2b03eb770205e2c4b94db25201a1
Gerrit-Change-Number: 18432
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to