Gabe Black has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/32929 )
Change subject: arch: Don't add contents to the TheISA namespace in
arch/generic.
......................................................................
arch: Don't add contents to the TheISA namespace in arch/generic.
Instead, add what you want other ISAs to be able to use to a generic,
fixed namespace, and then let those other ISAs bring those symbols in
with "using" if they want them.
Change-Id: I15bfaf56e76ffdc3bdb603deef4ad471211f4f24
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32929
Reviewed-by: Andreas Sandberg <[email protected]>
Maintainer: Andreas Sandberg <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/arch/generic/locked_mem.hh
M src/arch/null/locked_mem.hh
M src/arch/power/locked_mem.hh
M src/arch/sparc/locked_mem.hh
M src/arch/x86/locked_mem.hh
5 files changed, 35 insertions(+), 2 deletions(-)
Approvals:
Andreas Sandberg: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/arch/generic/locked_mem.hh b/src/arch/generic/locked_mem.hh
index 5fcb732..66a8f43 100644
--- a/src/arch/generic/locked_mem.hh
+++ b/src/arch/generic/locked_mem.hh
@@ -47,12 +47,15 @@
* Generic helper functions for locked memory accesses.
*/
-#include "config/the_isa.hh"
#include "mem/packet.hh"
#include "mem/request.hh"
-namespace TheISA
+namespace GenericISA
{
+
+namespace LockedMem
+{
+
template <class XC>
inline void
handleLockedSnoop(XC *xc, PacketPtr pkt, Addr cacheBlockMask)
@@ -85,6 +88,8 @@
{
}
+} // namespace LockedMem
+
} // namespace Generic ISA
#endif
diff --git a/src/arch/null/locked_mem.hh b/src/arch/null/locked_mem.hh
index e1e9cde..876d8b9 100644
--- a/src/arch/null/locked_mem.hh
+++ b/src/arch/null/locked_mem.hh
@@ -49,4 +49,11 @@
#include "arch/generic/locked_mem.hh"
+namespace NullISA
+{
+
+using namespace GenericISA::LockedMem;
+
+} // namespace NullISA
+
#endif
diff --git a/src/arch/power/locked_mem.hh b/src/arch/power/locked_mem.hh
index 8546b51..153f602 100644
--- a/src/arch/power/locked_mem.hh
+++ b/src/arch/power/locked_mem.hh
@@ -39,4 +39,11 @@
#include "arch/generic/locked_mem.hh"
+namespace PowerISA
+{
+
+using namespace GenericISA::LockedMem;
+
+} // namespace PowerISA
+
#endif // __ARCH_POWER_LOCKED_MEM_HH__
diff --git a/src/arch/sparc/locked_mem.hh b/src/arch/sparc/locked_mem.hh
index d73aab4..5521828 100644
--- a/src/arch/sparc/locked_mem.hh
+++ b/src/arch/sparc/locked_mem.hh
@@ -37,4 +37,11 @@
#include "arch/generic/locked_mem.hh"
+namespace SparcISA
+{
+
+using namespace GenericISA::LockedMem;
+
+} // namespace SparcISA
+
#endif
diff --git a/src/arch/x86/locked_mem.hh b/src/arch/x86/locked_mem.hh
index 6d4e8b7..2ff4781 100644
--- a/src/arch/x86/locked_mem.hh
+++ b/src/arch/x86/locked_mem.hh
@@ -37,4 +37,11 @@
#include "arch/generic/locked_mem.hh"
+namespace X86ISA
+{
+
+using namespace GenericISA::LockedMem;
+
+} // namespace X86ISA
+
#endif // __ARCH_X86_LOCKEDMEM_HH__
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/32929
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: I15bfaf56e76ffdc3bdb603deef4ad471211f4f24
Gerrit-Change-Number: 32929
Gerrit-PatchSet: 3
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Nikos Nikoleris <[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