From dd2d44547ddc08ccee9e1465104eff2f43efdec0 Mon Sep 17 00:00:00 2001 From: Tony Gutierrez Date: Wed, 18 Apr 2018 18:25:23 -0400 Subject: 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 Reviewed-by: Jason Lowe-Power Maintainer: Anthony Gutierrez Tested-by: kokoro --- src/kern/linux/linux.cc | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src/kern/linux') diff --git a/src/kern/linux/linux.cc b/src/kern/linux/linux.cc index b71ab3079..e499776dc 100644 --- a/src/kern/linux/linux.cc +++ b/src/kern/linux/linux.cc @@ -55,9 +55,6 @@ Linux::openSpecialFile(std::string path, Process *process, } 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 @@ Linux::etcPasswd(Process *process, ThreadContext *tc) 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); -} -- cgit v1.2.3