Gabe Black has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/23170 )
Change subject: sim: Get rid of the now unused SyscallDesc flags and
methods.
......................................................................
sim: Get rid of the now unused SyscallDesc flags and methods.
Jira Issue: https://gem5.atlassian.net/browse/GEM5-187
Change-Id: Icee18a4bd77a346d7f82ef4988651b753392d51e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23170
Tested-by: kokoro <noreply+kok...@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travagl...@arm.com>
Reviewed-by: Gabe Black <gabebl...@google.com>
Maintainer: Gabe Black <gabebl...@google.com>
---
M src/sim/syscall_desc.cc
M src/sim/syscall_desc.hh
2 files changed, 2 insertions(+), 48 deletions(-)
Approvals:
Gabe Black: Looks good to me, approved; Looks good to me, approved
Giacomo Travaglini: Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/sim/syscall_desc.cc b/src/sim/syscall_desc.cc
index bf378fe..3d767f0 100644
--- a/src/sim/syscall_desc.cc
+++ b/src/sim/syscall_desc.cc
@@ -84,11 +84,3 @@
if (!retval.suppressed() && !retval.needsRetry())
process->setSyscallReturn(tc, retval);
}
-
-bool
-SyscallDesc::needWarning()
-{
- bool suppress_warning = warnOnce() && _warned;
- _warned = true;
- return !suppress_warning;
-}
diff --git a/src/sim/syscall_desc.hh b/src/sim/syscall_desc.hh
index 8f6e33d..9a28591 100644
--- a/src/sim/syscall_desc.hh
+++ b/src/sim/syscall_desc.hh
@@ -70,25 +70,10 @@
using SyscallExecutor =
std::function<SyscallReturn(SyscallDesc *, int num, ThreadContext
*)>;
- SyscallDesc(const char *name,
- SyscallExecutor sys_exec=unimplementedFunc, int flags=0)
- : _name(name), executor(sys_exec), _flags(flags), _warned(false)
+ SyscallDesc(const char *name, SyscallExecutor
sys_exec=unimplementedFunc)
+ : _name(name), executor(sys_exec)
{}
- /** Provide a mechanism to specify behavior for abnormal system calls
*/
- enum Flags {
- /**
- * Do not set return registers according to executor return value.
- * Used for system calls with non-standard return conventions that
- * explicitly set the thread context regs (e.g., sigreturn, clone)
- */
- SuppressReturnValue = 1,
- /** Warn only once for unimplemented system calls */
- WarnOnce = 2
- /* X2 = 4, // Remove these comments when the next field is added;
*/
- /* X3 = 8, // point is to make it obvious that this defines vector
*/
- };
-
/**
* Interface for invoking the system call funcion pointer. Note that
* this acts as a gateway for all system calls and serves a good point
@@ -99,37 +84,14 @@
*/
void doSyscall(int callnum, ThreadContext *tc, Fault *fault);
- /**
- * Return false if WarnOnce is set and a warning has already been
issued.
- * Otherwise, return true. Updates state as a side effect to help
- * keep track of issued warnings.
- */
- bool needWarning();
-
- bool warnOnce() const { return (_flags & WarnOnce); }
-
std::string name() { return _name; }
- int getFlags() const { return _flags; }
-
- void setFlags(int flags) { _flags = flags; }
-
private:
/** System call name (e.g., open, mmap, clone, socket, etc.) */
std::string _name;
/** Mechanism for ISAs to connect to the emul function definitions */
SyscallExecutor executor;
-
- /**
- * Holds values set with the preceding enum; note that this has been
- * used primarily for features that are mutually exclusive, but there's
- * no reason that this needs to be true going forward.
- */
- int _flags;
-
- /** Set if WarnOnce is specified in flags AFTER first call */
- bool _warned;
};
#endif // __SIM_SYSCALL_DESC_HH__
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/23170
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Icee18a4bd77a346d7f82ef4988651b753392d51e
Gerrit-Change-Number: 23170
Gerrit-PatchSet: 5
Gerrit-Owner: Gabe Black <gabebl...@google.com>
Gerrit-Reviewer: Brandon Potter <brandon.pot...@amd.com>
Gerrit-Reviewer: Brandon Potter <ambitiousc...@gmail.com>
Gerrit-Reviewer: Gabe Black <gabebl...@google.com>
Gerrit-Reviewer: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.com>
Gerrit-Reviewer: Steve Reinhardt <ste...@gmail.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev