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 <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45418
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
This commit is contained in:
Daniel R. Carvalho
2021-05-06 16:00:10 -03:00
committed by Daniel Carvalho
parent 0967a43c10
commit 3bc93bb930
11 changed files with 41 additions and 25 deletions

View File

@@ -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 @@ FsLinux::startup()
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 @@ FsLinux::mapPid(ThreadContext *tc, uint32_t pid)
void
FsLinux::dumpDmesg()
{
Linux::dumpDmesg(system->threads[0], std::cout);
linux::dumpDmesg(system->threads[0], std::cout);
}
/**
@@ -282,7 +282,7 @@ void
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 @@ void
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);

View File

@@ -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)

View File

@@ -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 @@ class ThreadInfo
}
};
} // namespace Linux
} // namespace linux
#endif // __ARCH_GENERIC_LINUX_THREADINFO_HH__

View File

@@ -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;

View File

@@ -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;

View File

@@ -51,7 +51,8 @@
#include "sim/core.hh"
#include "sim/system.hh"
namespace Linux
GEM5_DEPRECATED_NAMESPACE(Linux, linux);
namespace linux
{
void

View File

@@ -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 @@ class DebugPrintk : public Base
* 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 @@ class DmesgDump : public PCEvent
* 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 @@ class SkipUDelay : public Base
}
};
} // namespace Linux
} // namespace linux
#endif // __KERN_LINUX_EVENTS_HH__

View File

@@ -90,7 +90,7 @@ dumpDmesgEntry(const uint8_t *base, const uint8_t *end, const ByteOrder bo,
}
void
Linux::dumpDmesg(ThreadContext *tc, std::ostream &os)
linux::dumpDmesg(ThreadContext *tc, std::ostream &os)
{
System *system = tc->getSystemPtr();
const ByteOrder bo = system->getGuestByteOrder();

View File

@@ -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 @@ namespace Linux {
*/
void dumpDmesg(ThreadContext *tc, std::ostream &os);
} // namespace Linux
} // namespace linux
#endif // __KERN_LINUX_HELPERS_HH__

View File

@@ -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 @@ printk(std::string &str, ThreadContext *tc, Addr format_ptr,
return str.length();
}
} // namespace Linux
} // namespace linux

View File

@@ -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 @@ using PrintkVarArgs =
int printk(std::string &out, ThreadContext *tc, Addr format_ptr,
PrintkVarArgs args);
} // namespace Linux
} // namespace linux
#endif // __KERN_LINUX_PRINTK_HH__