Gabe Black has submitted this change. ( 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
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/43665
Reviewed-by: Gabe Black <gabe.bl...@gmail.com>
Maintainer: Gabe Black <gabe.bl...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
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
M src/dev/x86/pc.cc
M src/dev/x86/pc.hh
9 files changed, 1 insertion(+), 102 deletions(-)

Approvals:
  Gabe Black: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



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__
diff --git a/src/dev/x86/pc.cc b/src/dev/x86/pc.cc
index c578403..85b9ddb 100644
--- a/src/dev/x86/pc.cc
+++ b/src/dev/x86/pc.cc
@@ -32,10 +32,6 @@

 #include "dev/x86/pc.hh"

-#include <deque>
-#include <string>
-#include <vector>
-
 #include "arch/x86/intmessage.hh"
 #include "arch/x86/x86_traits.hh"
 #include "dev/x86/i82094aa.hh"
diff --git a/src/dev/x86/pc.hh b/src/dev/x86/pc.hh
index 0e828e8..8503069 100644
--- a/src/dev/x86/pc.hh
+++ b/src/dev/x86/pc.hh
@@ -38,8 +38,6 @@
 #include "dev/platform.hh"
 #include "params/Pc.hh"

-class IdeController;
-class System;
 class SouthBridge;

 class Pc : public Platform



4 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
--
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: 6
Gerrit-Owner: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: Andreas Sandberg <andreas.sandb...@arm.com>
Gerrit-Reviewer: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.com>
Gerrit-Reviewer: Nikos Nikoleris <nikos.nikole...@arm.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-CC: Bobby R. Bruce <bbr...@ucdavis.edu>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to