misc: Adopt the gem5 namespace
Apply the gem5 namespace to the codebase. Some anonymous namespaces could theoretically be removed, but since this change's main goal was to keep conflicts at a minimum, it was decided not to modify much the general shape of the files. A few missing comments of the form "// namespace X" that occurred before the newly added "} // namespace gem5" have been added for consistency. std out should not be included in the gem5 namespace, so they weren't. ProtoMessage has not been included in the gem5 namespace, since I'm not familiar with how proto works. Regarding the SystemC files, although they belong to gem5, they actually perform integration between gem5 and SystemC; therefore, it deserved its own separate namespace. Files that are automatically generated have been included in the gem5 namespace. The .isa files currently are limited to a single namespace. This limitation should be later removed to make it easier to accomodate a better API. Regarding the files in util, gem5:: was prepended where suitable. Notice that this patch was tested as much as possible given that most of these were already not previously compiling. Change-Id: Ia53d404ec79c46edaa98f654e23bc3b0e179fe2d Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/46323 Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu> Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu> Reviewed-by: Matthew Poremba <matthew.poremba@amd.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Daniel Carvalho
parent
d4904b3b89
commit
974a47dfb9
@@ -43,21 +43,25 @@ class MhuDoorbell(Doorbell):
|
||||
type = 'MhuDoorbell'
|
||||
abstract = True
|
||||
cxx_header = "dev/arm/css/mhu.hh"
|
||||
cxx_class = 'gem5::MhuDoorbell'
|
||||
|
||||
class Scp2ApDoorbell(MhuDoorbell):
|
||||
type = 'Scp2ApDoorbell'
|
||||
cxx_header = "dev/arm/css/mhu.hh"
|
||||
cxx_class = 'gem5::Scp2ApDoorbell'
|
||||
|
||||
interrupt = Param.ArmInterruptPin("Interrupt Pin")
|
||||
|
||||
class Ap2ScpDoorbell(MhuDoorbell):
|
||||
type = 'Ap2ScpDoorbell'
|
||||
cxx_header = "dev/arm/css/mhu.hh"
|
||||
cxx_class = 'gem5::Ap2ScpDoorbell'
|
||||
|
||||
# Message Handling Unit
|
||||
class MHU(BasicPioDevice):
|
||||
type = 'MHU'
|
||||
cxx_header = "dev/arm/css/mhu.hh"
|
||||
cxx_class = 'gem5::MHU'
|
||||
pio_size = Param.Unsigned(0x1000, "MHU pio size")
|
||||
|
||||
lowp_scp2ap = Param.Scp2ApDoorbell(
|
||||
|
||||
@@ -46,7 +46,7 @@ class ScmiChannel(SimObject):
|
||||
"""
|
||||
type = 'ScmiChannel'
|
||||
cxx_header = "dev/arm/css/scmi_platform.hh"
|
||||
cxx_class = "scmi::VirtualChannel"
|
||||
cxx_class = "gem5::scmi::VirtualChannel"
|
||||
shmem_range = Param.AddrRange(
|
||||
"Virtual channel's shared memory address range")
|
||||
phys_id = Param.Unsigned(4,
|
||||
@@ -78,7 +78,7 @@ class ScmiAgentChannel(ScmiChannel):
|
||||
"""
|
||||
type = 'ScmiAgentChannel'
|
||||
cxx_header = "dev/arm/css/scmi_platform.hh"
|
||||
cxx_class = "scmi::AgentChannel"
|
||||
cxx_class = "gem5::scmi::AgentChannel"
|
||||
|
||||
|
||||
class ScmiPlatformChannel(ScmiChannel):
|
||||
@@ -87,7 +87,7 @@ class ScmiPlatformChannel(ScmiChannel):
|
||||
"""
|
||||
type = 'ScmiPlatformChannel'
|
||||
cxx_header = "dev/arm/css/scmi_platform.hh"
|
||||
cxx_class = "scmi::PlatformChannel"
|
||||
cxx_class = "gem5::scmi::PlatformChannel"
|
||||
|
||||
class ScmiCommunication(SimObject):
|
||||
"""
|
||||
@@ -98,7 +98,7 @@ class ScmiCommunication(SimObject):
|
||||
"""
|
||||
type = 'ScmiCommunication'
|
||||
cxx_header = "dev/arm/css/scmi_platform.hh"
|
||||
cxx_class = "scmi::Communication"
|
||||
cxx_class = "gem5::scmi::Communication"
|
||||
|
||||
agent_channel = Param.ScmiAgentChannel(
|
||||
"Agent to Platform channel")
|
||||
@@ -108,7 +108,7 @@ class ScmiCommunication(SimObject):
|
||||
class ScmiPlatform(Scp):
|
||||
type = 'ScmiPlatform'
|
||||
cxx_header = "dev/arm/css/scmi_platform.hh"
|
||||
cxx_class = "scmi::Platform"
|
||||
cxx_class = "gem5::scmi::Platform"
|
||||
|
||||
comms = VectorParam.ScmiCommunication([],
|
||||
"SCMI Communications")
|
||||
|
||||
@@ -40,3 +40,4 @@ class Scp(ClockedObject):
|
||||
type = 'Scp'
|
||||
abstract = True
|
||||
cxx_header = "dev/arm/css/scp.hh"
|
||||
cxx_class = 'gem5::Scp'
|
||||
|
||||
@@ -45,6 +45,9 @@
|
||||
#include "params/MHU.hh"
|
||||
#include "params/Scp2ApDoorbell.hh"
|
||||
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
Scp2ApDoorbell::Scp2ApDoorbell(const Scp2ApDoorbellParams &p)
|
||||
: MhuDoorbell(p), interrupt(p.interrupt->get())
|
||||
{}
|
||||
@@ -239,3 +242,5 @@ Ap2ScpDoorbell::clearInterrupt()
|
||||
{
|
||||
scp->clearInterrupt(this);
|
||||
}
|
||||
|
||||
} // namespace gem5
|
||||
|
||||
@@ -41,6 +41,9 @@
|
||||
#include "dev/arm/doorbell.hh"
|
||||
#include "dev/io_device.hh"
|
||||
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
struct Ap2ScpDoorbellParams;
|
||||
class ArmInterruptPin;
|
||||
class MHU;
|
||||
@@ -166,4 +169,6 @@ class MHU : public BasicPioDevice
|
||||
uint32_t scfg;
|
||||
};
|
||||
|
||||
} // namespace gem5
|
||||
|
||||
#endif // __DEV_ARM_CSS_MHU_H__
|
||||
|
||||
@@ -43,6 +43,9 @@
|
||||
#include "dev/arm/doorbell.hh"
|
||||
#include "mem/packet_access.hh"
|
||||
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
using namespace scmi;
|
||||
|
||||
AgentChannel::AgentChannel(const ScmiChannelParams &p)
|
||||
@@ -303,3 +306,5 @@ Platform::find(AgentChannel* agent) const
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
} // namespace gem5
|
||||
|
||||
@@ -43,6 +43,9 @@
|
||||
#include "dev/dma_device.hh"
|
||||
#include "params/ScmiPlatform.hh"
|
||||
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
class Doorbell;
|
||||
|
||||
GEM5_DEPRECATED_NAMESPACE(SCMI, scmi);
|
||||
@@ -327,5 +330,6 @@ class Platform : public Scp
|
||||
};
|
||||
|
||||
} // namespace scmi
|
||||
} // namespace gem5
|
||||
|
||||
#endif // __DEV_ARM_CSS_SCMI_PLATFORM_H__
|
||||
|
||||
@@ -40,6 +40,9 @@
|
||||
#include "debug/SCMI.hh"
|
||||
#include "dev/arm/css/scmi_platform.hh"
|
||||
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
using namespace scmi;
|
||||
|
||||
const std::string
|
||||
@@ -280,3 +283,5 @@ BaseProtocol::invalidCommand(Message &msg)
|
||||
payload.status = NOT_FOUND;
|
||||
msg.length = sizeof(uint32_t) * 2;
|
||||
}
|
||||
|
||||
} // namespace gem5
|
||||
|
||||
@@ -43,6 +43,9 @@
|
||||
|
||||
#include "base/compiler.hh"
|
||||
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
GEM5_DEPRECATED_NAMESPACE(SCMI, scmi);
|
||||
namespace scmi
|
||||
{
|
||||
@@ -151,6 +154,7 @@ class BaseProtocol : public Protocol
|
||||
|
||||
};
|
||||
|
||||
}; // namespace scmi
|
||||
} // namespace scmi
|
||||
} // namespace gem5
|
||||
|
||||
#endif
|
||||
|
||||
@@ -40,6 +40,9 @@
|
||||
|
||||
#include "sim/clocked_object.hh"
|
||||
|
||||
namespace gem5
|
||||
{
|
||||
|
||||
class Doorbell;
|
||||
|
||||
class Scp : public ClockedObject
|
||||
@@ -55,4 +58,6 @@ class Scp : public ClockedObject
|
||||
virtual void clearInterrupt(const Doorbell *doorbell) = 0;
|
||||
};
|
||||
|
||||
} // namespace gem5
|
||||
|
||||
#endif // __DEV_ARM_CSS_SCP_H__
|
||||
|
||||
Reference in New Issue
Block a user