systemc: Eliminate the unused PythonReadyFunc mechanism.

Change-Id: I8892e4d209901454f2ab923aa3fa9932d7963274
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54323
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
diff --git a/src/systemc/core/SystemC.py b/src/systemc/core/SystemC.py
index 6828175..592b950 100644
--- a/src/systemc/core/SystemC.py
+++ b/src/systemc/core/SystemC.py
@@ -63,11 +63,3 @@
     @cxxMethod(return_value_policy="reference", cxx_name="gem5_getPort")
     def getPort(self, if_name, iex):
         return None
-
-try:
-    import _m5
-except:
-    pass
-else:
-    import _m5.systemc
-    _m5.systemc.python_ready()
diff --git a/src/systemc/core/python.cc b/src/systemc/core/python.cc
index 8f2d56b..2283ae7 100644
--- a/src/systemc/core/python.cc
+++ b/src/systemc/core/python.cc
@@ -38,13 +38,6 @@
 namespace
 {
 
-PythonReadyFunc *&
-firstReadyFunc()
-{
-    static PythonReadyFunc *first = nullptr;
-    return first;
-}
-
 PythonInitFunc *&
 firstInitFunc()
 {
@@ -53,17 +46,9 @@
 }
 
 void
-python_ready(pybind11::args args)
-{
-    for (auto ptr = firstReadyFunc(); ptr; ptr = ptr->next)
-        ptr->run();
-}
-
-void
 systemc_pybind(pybind11::module_ &m_internal)
 {
     pybind11::module_ m = m_internal.def_submodule("systemc");
-    m.def("python_ready", &python_ready);
     for (auto ptr = firstInitFunc(); ptr; ptr = ptr->next)
         ptr->run(m);
 }
@@ -71,11 +56,6 @@
 
 } // anonymous namespace
 
-PythonReadyFunc::PythonReadyFunc() : next(firstReadyFunc())
-{
-    firstReadyFunc() = this;
-}
-
 PythonInitFunc::PythonInitFunc() : next(firstInitFunc())
 {
     firstInitFunc() = this;
diff --git a/src/systemc/core/python.hh b/src/systemc/core/python.hh
index 61c9c80..5a3f6ef 100644
--- a/src/systemc/core/python.hh
+++ b/src/systemc/core/python.hh
@@ -33,15 +33,6 @@
 namespace sc_gem5
 {
 
-struct PythonReadyFunc
-{
-    PythonReadyFunc *next;
-
-    PythonReadyFunc();
-    ~PythonReadyFunc() {}
-    virtual void run() = 0;
-};
-
 struct PythonInitFunc
 {
     PythonInitFunc *next;