Brandon Potter has submitted this change and it was merged. (
https://gem5-review.googlesource.com/c/public/gem5/+/12127 )
Change subject: sim-se: remove /sys from special paths
......................................................................
sim-se: remove /sys from special paths
Currently, the open system call implementation in SE mode
treats /sys/ as a special path that is opened using a
special open handler. The ROC runtime, however, reads
several files in /sys/ that are supported via path
redirection. Here we remove /sys/ from the special files
so that the necessary files may be read via path
redirection.
Change-Id: Ifdab38ea1e6cc486ad43aec96b6e032fe63f137d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/12127
Reviewed-by: Anthony Gutierrez <[email protected]>
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Anthony Gutierrez <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/kern/linux/linux.cc
M src/sim/syscall_emul.hh
2 files changed, 1 insertion(+), 12 deletions(-)
Approvals:
Jason Lowe-Power: Looks good to me, approved
Anthony Gutierrez: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/kern/linux/linux.cc b/src/kern/linux/linux.cc
index b71ab30..e499776 100644
--- a/src/kern/linux/linux.cc
+++ b/src/kern/linux/linux.cc
@@ -55,9 +55,6 @@
} else if (path.compare(0, 11, "/etc/passwd") == 0) {
data = Linux::etcPasswd(process, tc);
matched = true;
- } else if (path.compare(0, 30, "/sys/devices/system/cpu/online") == 0)
{
- data = Linux::cpuOnline(process, tc);
- matched = true;
}
if (matched) {
@@ -90,10 +87,3 @@
return csprintf("gem5-user:x:1000:1000:gem5-user,,,:%s:/bin/bash\n",
process->tgtCwd);
}
-
-std::string
-Linux::cpuOnline(Process *process, ThreadContext *tc)
-{
- return csprintf("0-%d\n",
- tc->getSystemPtr()->numContexts() - 1);
-}
diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh
index caa4d2c..92fb8bf 100644
--- a/src/sim/syscall_emul.hh
+++ b/src/sim/syscall_emul.hh
@@ -934,8 +934,7 @@
int sim_fd = -1;
std::string used_path;
std::vector<std::string> special_paths =
- { "/proc/meminfo/", "/system/", "/sys/", "/platform/",
- "/etc/passwd" };
+ { "/proc/meminfo/", "/system/", "/platform/", "/etc/passwd" };
for (auto entry : special_paths) {
if (startswith(path, entry)) {
sim_fd = OS::openSpecialFile(abs_path, p, tc);
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/12127
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: Ifdab38ea1e6cc486ad43aec96b6e032fe63f137d
Gerrit-Change-Number: 12127
Gerrit-PatchSet: 27
Gerrit-Owner: Brandon Potter <[email protected]>
Gerrit-Reviewer: Alexandru Duțu <[email protected]>
Gerrit-Reviewer: Anthony Gutierrez <[email protected]>
Gerrit-Reviewer: Brandon Potter <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: John Alsop <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-CC: Bradford Beckmann <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev