summaryrefslogtreecommitdiff
path: root/src/kern/linux/linux.hh
diff options
context:
space:
mode:
authorJason Lowe-Power <jason@lowepower.com>2017-07-25 13:12:27 -0500
committerJason Lowe-Power <jason@lowepower.com>2018-03-15 20:45:34 +0000
commit1723e8ecc28ee8b55c9b8008456726f60ea8fcc2 (patch)
tree62ebda1688fa43b10c586744b53aae0eb54ca02a /src/kern/linux/linux.hh
parent65d0a6b3accbb168300d9c4f18845e6fb8a96e77 (diff)
downloadgem5-1723e8ecc28ee8b55c9b8008456726f60ea8fcc2.tar.xz
sim-se: Add /sys/devices/system/cpu/online file
Add the special file /sys/devices/system/cpu/online to the files that gem5 knows how to handle in SE mode. This file lists the CPUs that are active. For instance, in an 8 CPU system it is the following: 0-7 This implementation simply returns a file that is 0-%d where %d is the current number of thread contexts. This file is required for C++11 threads with gcc 4.8 and above. Change-Id: I0b566f77e75e9eca480509814d0fd038a231b940 Signed-off-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-on: https://gem5-review.googlesource.com/8902 Reviewed-by: Gabe Black <gabeblack@google.com> Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com>
Diffstat (limited to 'src/kern/linux/linux.hh')
-rw-r--r--src/kern/linux/linux.hh1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/kern/linux/linux.hh b/src/kern/linux/linux.hh
index b24ee3895..a1df99467 100644
--- a/src/kern/linux/linux.hh
+++ b/src/kern/linux/linux.hh
@@ -227,6 +227,7 @@ class Linux : public OperatingSystem
ThreadContext *tc);
static std::string procMeminfo(Process *process, ThreadContext *tc);
static std::string etcPasswd(Process *process, ThreadContext *tc);
+ static std::string cpuOnline(Process *process, ThreadContext *tc);
// For futex system call
static const unsigned TGT_FUTEX_WAIT = 0;