Daniel Carvalho has submitted this change. (
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]>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45418
Tested-by: kokoro <[email protected]>
Maintainer: Gabe Black <[email protected]>
Reviewed-by: Hoa Nguyen <[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, 41 insertions(+), 25 deletions(-)
Approvals:
Hoa Nguyen: Looks good to me, approved
Gabe Black: Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/arch/arm/linux/fs_workload.cc
b/src/arch/arm/linux/fs_workload.cc
index dc70765..481db6f 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..3579589 100644
--- a/src/arch/generic/linux/threadinfo.hh
+++ b/src/arch/generic/linux/threadinfo.hh
@@ -32,7 +32,9 @@
#include "cpu/thread_context.hh"
#include "sim/system.hh"
-namespace Linux {
+GEM5_DEPRECATED_NAMESPACE(Linux, linux);
+namespace linux
+{
class ThreadInfo
{
@@ -183,6 +185,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..8686d26 100644
--- a/src/arch/mips/linux/hwrpb.hh
+++ b/src/arch/mips/linux/hwrpb.hh
@@ -27,7 +27,9 @@
#include "arch/mips/linux/aligned.hh"
-namespace Linux {
+GEM5_DEPRECATED_NAMESPACE(Linux, 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..cec97f0 100644
--- a/src/arch/mips/linux/thread_info.hh
+++ b/src/arch/mips/linux/thread_info.hh
@@ -31,7 +31,9 @@
#include "arch/mips/linux/hwrpb.hh"
-namespace Linux {
+GEM5_DEPRECATED_NAMESPACE(Linux, 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..10680b5 100644
--- a/src/kern/linux/events.cc
+++ b/src/kern/linux/events.cc
@@ -51,7 +51,8 @@
#include "sim/core.hh"
#include "sim/system.hh"
-namespace Linux
+GEM5_DEPRECATED_NAMESPACE(Linux, linux);
+namespace linux
{
void
diff --git a/src/kern/linux/events.hh b/src/kern/linux/events.hh
index d833ed5..8ce2887 100644
--- a/src/kern/linux/events.hh
+++ b/src/kern/linux/events.hh
@@ -44,6 +44,7 @@
#include <functional>
#include <string>
+#include "base/compiler.hh"
#include "base/trace.hh"
#include "debug/DebugPrintf.hh"
#include "kern/linux/printk.hh"
@@ -53,7 +54,8 @@
class ThreadContext;
-namespace Linux
+GEM5_DEPRECATED_NAMESPACE(Linux, linux);
+namespace linux
{
template <typename ABI, typename Base>
@@ -82,7 +84,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 +105,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 +169,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 86a11c7..e443996 100644
--- a/src/kern/linux/helpers.cc
+++ b/src/kern/linux/helpers.cc
@@ -90,7 +90,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..f9c44c7 100644
--- a/src/kern/linux/helpers.hh
+++ b/src/kern/linux/helpers.hh
@@ -40,9 +40,13 @@
#include <ostream>
+#include "base/compiler.hh"
+
class ThreadContext;
-namespace Linux {
+GEM5_DEPRECATED_NAMESPACE(Linux, linux);
+namespace linux
+{
/**
* Dump Linux's dmesg log buffer to the an output stream.
@@ -52,6 +56,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 d2bf414..9cb02a6 100644
--- a/src/kern/linux/printk.cc
+++ b/src/kern/linux/printk.cc
@@ -38,7 +38,8 @@
#include "cpu/thread_context.hh"
#include "mem/port_proxy.hh"
-namespace Linux
+GEM5_DEPRECATED_NAMESPACE(Linux, linux);
+namespace linux
{
int
@@ -248,4 +249,4 @@
return str.length();
}
-} // namespace Linux
+} // namespace linux
diff --git a/src/kern/linux/printk.hh b/src/kern/linux/printk.hh
index cb7bc9a..536031f 100644
--- a/src/kern/linux/printk.hh
+++ b/src/kern/linux/printk.hh
@@ -31,10 +31,12 @@
#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 =
@@ -42,6 +44,6 @@
int printk(std::string &out, ThreadContext *tc, Addr format_ptr,
PrintkVarArgs args);
-} // namespace Linux
+} // namespace linux
#endif // __KERN_LINUX_PRINTK_HH__
5 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/+/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: 9
Gerrit-Owner: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Hoa Nguyen <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s