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

Change subject: dev: Remove cruft from the Platform devices.
......................................................................

dev: Remove cruft from the Platform devices.

These bits of cruft are unnecessary includes, unnecessary declarations
of classes which aren't used, and methods which aren't used, and are
also frequently not implemented.

Change-Id: I3df6d60983354bb545bc11880fb6e16fe74adb1d
---
M src/dev/arm/realview.cc
M src/dev/mips/malta.cc
M src/dev/mips/malta.hh
M src/dev/riscv/hifive.cc
M src/dev/riscv/hifive.hh
M src/dev/sparc/t1000.cc
M src/dev/sparc/t1000.hh
7 files changed, 1 insertion(+), 96 deletions(-)



diff --git a/src/dev/arm/realview.cc b/src/dev/arm/realview.cc
index 5cdac9e..55ba9b3 100644
--- a/src/dev/arm/realview.cc
+++ b/src/dev/arm/realview.cc
@@ -44,13 +44,9 @@

 #include "dev/arm/realview.hh"

-#include <deque>
-#include <string>
-#include <vector>
-
+#include "base/logging.hh"
 #include "dev/arm/base_gic.hh"

-
 RealView::RealView(const Params &p)
     : Platform(p), gic(nullptr)
 {}
diff --git a/src/dev/mips/malta.cc b/src/dev/mips/malta.cc
index 69c56a5..b327d1e 100644
--- a/src/dev/mips/malta.cc
+++ b/src/dev/mips/malta.cc
@@ -32,15 +32,10 @@

 #include "dev/mips/malta.hh"

-#include <deque>
-#include <string>
-#include <vector>
-
 #include "debug/Malta.hh"
 #include "dev/mips/malta_cchip.hh"
 #include "dev/mips/malta_io.hh"
 #include "params/Malta.hh"
-#include "sim/system.hh"

 Malta::Malta(const Params &p)
     : Platform(p)
@@ -75,12 +70,6 @@
     panic("Malta::clearPciInt() has not been implemented.");
 }

-Addr
-Malta::pciToDma(Addr pciAddr) const
-{
-    panic("Malta::pciToDma() has not been implemented.");
-}
-
 void
 Malta::serialize(CheckpointOut &cp) const
 {
diff --git a/src/dev/mips/malta.hh b/src/dev/mips/malta.hh
index 3b7f99f..637e571 100644
--- a/src/dev/mips/malta.hh
+++ b/src/dev/mips/malta.hh
@@ -38,10 +38,8 @@
 #include "dev/platform.hh"
 #include "params/Malta.hh"

-class IdeController;
 class MaltaCChip;
 class MaltaIO;
-class System;

 /**
   * Top level class for Malta Chipset emulation.
@@ -92,27 +90,6 @@
      */
     void clearPciInt(int line) override;

-
-    virtual Addr pciToDma(Addr pciAddr) const;
-
-    Addr
-    calcPciConfigAddr(int bus, int dev, int func)
-    {
-        panic("Need implementation\n");
-    }
-
-    Addr
-    calcPciIOAddr(Addr addr)
-    {
-        panic("Need implementation\n");
-    }
-
-    Addr
-    calcPciMemAddr(Addr addr)
-    {
-        panic("Need implementation\n");
-    }
-
     void serialize(CheckpointOut &cp) const override;
     void unserialize(CheckpointIn &cp) override;
 };
diff --git a/src/dev/riscv/hifive.cc b/src/dev/riscv/hifive.cc
index bb376bb..bd2e6f4 100644
--- a/src/dev/riscv/hifive.cc
+++ b/src/dev/riscv/hifive.cc
@@ -75,12 +75,6 @@
     plic->clear(line);
 }

-Addr
-HiFive::pciToDma(Addr pciAddr) const
-{
-    panic("HiFive::pciToDma() has not been implemented.");
-}
-
 void
 HiFive::serialize(CheckpointOut &cp) const
 {
diff --git a/src/dev/riscv/hifive.hh b/src/dev/riscv/hifive.hh
index 4e4e139..87e9d7b 100644
--- a/src/dev/riscv/hifive.hh
+++ b/src/dev/riscv/hifive.hh
@@ -64,8 +64,6 @@

     void clearPciInt(int line) override;

-    virtual Addr pciToDma(Addr pciAddr) const;
-
     void serialize(CheckpointOut &cp) const override;

     void unserialize(CheckpointIn &cp) override;
diff --git a/src/dev/sparc/t1000.cc b/src/dev/sparc/t1000.cc
index 9b41844..783dd3f 100644
--- a/src/dev/sparc/t1000.cc
+++ b/src/dev/sparc/t1000.cc
@@ -32,10 +32,6 @@

 #include "dev/sparc/t1000.hh"

-#include <deque>
-#include <string>
-#include <vector>
-
 #include "base/logging.hh"

 T1000::T1000(const Params &p) : Platform(p) {}
@@ -65,28 +61,3 @@
 {
     panic("Need implementation\n");
 }
-
-Addr
-T1000::pciToDma(Addr pciAddr) const
-{
-    panic("Need implementation\n");
-}
-
-
-Addr
-T1000::calcPciConfigAddr(int bus, int dev, int func)
-{
-    panic("Need implementation\n");
-}
-
-Addr
-T1000::calcPciIOAddr(Addr addr)
-{
-    panic("Need implementation\n");
-}
-
-Addr
-T1000::calcPciMemAddr(Addr addr)
-{
-    panic("Need implementation\n");
-}
diff --git a/src/dev/sparc/t1000.hh b/src/dev/sparc/t1000.hh
index 9cf257e..94a7cac 100644
--- a/src/dev/sparc/t1000.hh
+++ b/src/dev/sparc/t1000.hh
@@ -38,8 +38,6 @@
 #include "dev/platform.hh"
 #include "params/T1000.hh"

-class IdeController;
-
 class T1000 : public Platform
 {
   public:
@@ -71,24 +69,6 @@
      * Clear a posted PCI->CPU interrupt
      */
     virtual void clearPciInt(int line);
-
-
-    virtual Addr pciToDma(Addr pciAddr) const;
-
-    /**
-     * Calculate the configuration address given a bus/dev/func.
-     */
-    virtual Addr calcPciConfigAddr(int bus, int dev, int func);
-
-    /**
-     * Calculate the address for an IO location on the PCI bus.
-     */
-    virtual Addr calcPciIOAddr(Addr addr);
-
-    /**
-     * Calculate the address for a memory location on the PCI bus.
-     */
-    virtual Addr calcPciMemAddr(Addr addr);
 };

 #endif // __DEV_T1000_HH__

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

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I3df6d60983354bb545bc11880fb6e16fe74adb1d
Gerrit-Change-Number: 43665
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to