Daniel Carvalho has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/45418 )

Change subject: arch: Rename Linux namespace as linux
......................................................................

arch: Rename Linux namespace as linux

As part of recent decisions regarding namespace
naming conventions, all namespaces will be changed
to snake case.

::Linux became ::linux.

Change-Id: I3c34790530464b42ded795ce5b78719387a79a00
Signed-off-by: Daniel R. Carvalho <[email protected]>
---
M src/arch/arm/linux/fs_workload.cc
M src/arch/arm/system.cc
M src/arch/generic/linux/threadinfo.hh
M src/arch/mips/linux/hwrpb.hh
M src/arch/mips/linux/thread_info.hh
M src/kern/linux/events.cc
M src/kern/linux/events.hh
M src/kern/linux/helpers.cc
M src/kern/linux/helpers.hh
M src/kern/linux/printk.cc
M src/kern/linux/printk.hh
11 files changed, 27 insertions(+), 29 deletions(-)



diff --git a/src/arch/arm/linux/fs_workload.cc b/src/arch/arm/linux/fs_workload.cc
index e392a86..dc3071d 100644
--- a/src/arch/arm/linux/fs_workload.cc
+++ b/src/arch/arm/linux/fs_workload.cc
@@ -57,7 +57,7 @@
 #include "mem/physical.hh"
 #include "sim/stat_control.hh"

-using namespace Linux;
+using namespace linux;

 namespace ArmISA
 {
@@ -212,18 +212,18 @@

     const std::string dmesg_output = name() + ".dmesg";
     if (params().panic_on_panic) {
-        kernelPanic = addKernelFuncEventOrPanic<Linux::KernelPanic>(
+        kernelPanic = addKernelFuncEventOrPanic<linux::KernelPanic>(
             "panic", "Kernel panic in simulated kernel", dmesg_output);
     } else {
-        kernelPanic = addKernelFuncEventOrPanic<Linux::DmesgDump>(
+        kernelPanic = addKernelFuncEventOrPanic<linux::DmesgDump>(
             "panic", "Kernel panic in simulated kernel", dmesg_output);
     }

     if (params().panic_on_oops) {
-        kernelOops = addKernelFuncEventOrPanic<Linux::KernelPanic>(
+        kernelOops = addKernelFuncEventOrPanic<linux::KernelPanic>(
             "oops_exit", "Kernel oops in guest", dmesg_output);
     } else {
-        kernelOops = addKernelFuncEventOrPanic<Linux::DmesgDump>(
+        kernelOops = addKernelFuncEventOrPanic<linux::DmesgDump>(
             "oops_exit", "Kernel oops in guest", dmesg_output);
     }

@@ -267,7 +267,7 @@
 void
 FsLinux::dumpDmesg()
 {
-    Linux::dumpDmesg(system->threads[0], std::cout);
+    linux::dumpDmesg(system->threads[0], std::cout);
 }

 /**
@@ -282,7 +282,7 @@
 DumpStats::getTaskDetails(ThreadContext *tc, uint32_t &pid,
     uint32_t &tgid, std::string &next_task_str, int32_t &mm) {

-    Linux::ThreadInfo ti(tc);
+    linux::ThreadInfo ti(tc);
     Addr task_descriptor = tc->readIntReg(2);
     pid = ti.curTaskPID(task_descriptor);
     tgid = ti.curTaskTGID(task_descriptor);
@@ -304,7 +304,7 @@
 DumpStats64::getTaskDetails(ThreadContext *tc, uint32_t &pid,
     uint32_t &tgid, std::string &next_task_str, int32_t &mm) {

-    Linux::ThreadInfo ti(tc);
+    linux::ThreadInfo ti(tc);
     Addr task_struct = tc->readIntReg(1);
     pid = ti.curTaskPIDFromTaskStruct(task_struct);
     tgid = ti.curTaskTGIDFromTaskStruct(task_struct);
diff --git a/src/arch/arm/system.cc b/src/arch/arm/system.cc
index 783366d..e8efb9c 100644
--- a/src/arch/arm/system.cc
+++ b/src/arch/arm/system.cc
@@ -51,7 +51,7 @@
 #include "dev/arm/gic_v2.hh"
 #include "mem/physical.hh"

-using namespace Linux;
+using namespace linux;
 using namespace ArmISA;

 ArmSystem::ArmSystem(const Params &p)
diff --git a/src/arch/generic/linux/threadinfo.hh b/src/arch/generic/linux/threadinfo.hh
index e5ba7e2..f73c45b 100644
--- a/src/arch/generic/linux/threadinfo.hh
+++ b/src/arch/generic/linux/threadinfo.hh
@@ -32,7 +32,7 @@
 #include "cpu/thread_context.hh"
 #include "sim/system.hh"

-namespace Linux {
+namespace linux {

 class ThreadInfo
 {
@@ -183,6 +183,6 @@
     }
 };

-} // namespace Linux
+} // namespace linux

 #endif // __ARCH_GENERIC_LINUX_THREADINFO_HH__
diff --git a/src/arch/mips/linux/hwrpb.hh b/src/arch/mips/linux/hwrpb.hh
index f7b8bfa..312d086 100644
--- a/src/arch/mips/linux/hwrpb.hh
+++ b/src/arch/mips/linux/hwrpb.hh
@@ -27,7 +27,7 @@

 #include "arch/mips/linux/aligned.hh"

-namespace Linux {
+namespace linux {
     struct pcb_struct
     {
         uint64_ta rpb_ksp;
diff --git a/src/arch/mips/linux/thread_info.hh b/src/arch/mips/linux/thread_info.hh
index 3f26ef1..9e37e79 100644
--- a/src/arch/mips/linux/thread_info.hh
+++ b/src/arch/mips/linux/thread_info.hh
@@ -31,7 +31,7 @@

 #include "arch/mips/linux/hwrpb.hh"

-namespace Linux {
+namespace linux {
     struct thread_info
     {
         struct pcb_struct       pcb;
diff --git a/src/kern/linux/events.cc b/src/kern/linux/events.cc
index aca839e..15a62a7 100644
--- a/src/kern/linux/events.cc
+++ b/src/kern/linux/events.cc
@@ -51,8 +51,7 @@
 #include "sim/core.hh"
 #include "sim/system.hh"

-namespace Linux
-{
+namespace linux {

 void
 DmesgDump::process(ThreadContext *tc)
diff --git a/src/kern/linux/events.hh b/src/kern/linux/events.hh
index d833ed5..93afdad 100644
--- a/src/kern/linux/events.hh
+++ b/src/kern/linux/events.hh
@@ -53,8 +53,7 @@

 class ThreadContext;

-namespace Linux
-{
+namespace linux {

 template <typename ABI, typename Base>
 class DebugPrintk : public Base
@@ -82,7 +81,7 @@
  * Dump the guest kernel's dmesg buffer to a file in gem5's output
  * directory and print a warning.
  *
- * @warn This event uses Linux::dumpDmesg() and comes with the same
+ * @warn This event uses linux::dumpDmesg() and comes with the same
  * limitations. Most importantly, the kernel's address mappings must
  * be available to the translating proxy.
  */
@@ -103,7 +102,7 @@
  * Dump the guest kernel's dmesg buffer to a file in gem5's output
  * directory and panic.
  *
- * @warn This event uses Linux::dumpDmesg() and comes with the same
+ * @warn This event uses linux::dumpDmesg() and comes with the same
  * limitations. Most importantly, the kernel's address mappings must
  * be available to the translating proxy.
  */
@@ -167,6 +166,6 @@
     }
 };

-} // namespace Linux
+} // namespace linux

 #endif // __KERN_LINUX_EVENTS_HH__
diff --git a/src/kern/linux/helpers.cc b/src/kern/linux/helpers.cc
index a81f638..88908e3 100644
--- a/src/kern/linux/helpers.cc
+++ b/src/kern/linux/helpers.cc
@@ -89,7 +89,7 @@
 }

 void
-Linux::dumpDmesg(ThreadContext *tc, std::ostream &os)
+linux::dumpDmesg(ThreadContext *tc, std::ostream &os)
 {
     System *system = tc->getSystemPtr();
     const ByteOrder bo = system->getGuestByteOrder();
diff --git a/src/kern/linux/helpers.hh b/src/kern/linux/helpers.hh
index 34a0993..0027744 100644
--- a/src/kern/linux/helpers.hh
+++ b/src/kern/linux/helpers.hh
@@ -42,7 +42,7 @@

 class ThreadContext;

-namespace Linux {
+namespace linux {

 /**
  * Dump Linux's dmesg log buffer to the an output stream.
@@ -52,6 +52,6 @@
  */
 void dumpDmesg(ThreadContext *tc, std::ostream &os);

-} // namespace Linux
+} // namespace linux

 #endif // __KERN_LINUX_HELPERS_HH__
diff --git a/src/kern/linux/printk.cc b/src/kern/linux/printk.cc
index c2f8ac5..2a57562 100644
--- a/src/kern/linux/printk.cc
+++ b/src/kern/linux/printk.cc
@@ -37,8 +37,7 @@
 #include "cpu/thread_context.hh"
 #include "mem/port_proxy.hh"

-namespace Linux
-{
+namespace linux {

 int
 printk(std::string &str, ThreadContext *tc, Addr format_ptr,
@@ -247,4 +246,4 @@
     return str.length();
 }

-} // namespace Linux
+} // namespace linux
diff --git a/src/kern/linux/printk.hh b/src/kern/linux/printk.hh
index cb7bc9a..706c8e4 100644
--- a/src/kern/linux/printk.hh
+++ b/src/kern/linux/printk.hh
@@ -31,17 +31,18 @@

 #include <string>

+#include "base/compiler.hh"
 #include "base/types.hh"
 #include "sim/guest_abi.hh"

-namespace Linux
-{
+GEM5_DEPRECATED_NAMESPACE(Linux, linux);
+namespace linux {

 using PrintkVarArgs =
     GuestABI::VarArgs<Addr, int32_t, uint32_t, int64_t, uint64_t>;
 int printk(std::string &out, ThreadContext *tc, Addr format_ptr,
            PrintkVarArgs args);

-} // namespace Linux
+} // namespace linux

 #endif // __KERN_LINUX_PRINTK_HH__

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/45418
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: I3c34790530464b42ded795ce5b78719387a79a00
Gerrit-Change-Number: 45418
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Carvalho <[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