sim-se: Ignore unimplemented system call
authorKyle Roarty <kyleroarty1716@gmail.com>
Fri, 24 May 2019 18:34:17 +0000 (13:34 -0500)
committerKyle Roarty <kyleroarty1716@gmail.com>
Thu, 11 Jun 2020 21:00:12 +0000 (21:00 +0000)
System call sched_setaffinity causes crashes when running programs
that use ROCm. Ignoring the system call allows for the programs
to run to completion.

Change-Id: I27c767ef81091789e228d47f2bb5f6fa18f11539
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30154
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Brandon Potter <Brandon.Potter@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/arch/x86/linux/process.cc

index 2c594e75680d37cbe8edfd4bbcfe6c47c844109e..3a86b76548775f294d8ee3021020b32b5bddb763 100644 (file)
@@ -460,7 +460,7 @@ static SyscallDescTable<X86_64LinuxProcess::SyscallABI> syscallDescs64 = {
     { 200, "tkill" },
     { 201, "time", timeFunc<X86Linux64> },
     { 202, "futex", futexFunc<X86Linux64> },
-    { 203, "sched_setaffinity" },
+    { 203, "sched_setaffinity", ignoreFunc },
     { 204, "sched_getaffinity", ignoreFunc },
     { 205, "set_thread_area" },
     { 206, "io_setup" },
@@ -837,7 +837,7 @@ static SyscallDescTable<I386LinuxProcess::SyscallABI> syscallDescs32 = {
     { 238, "tkill" },
     { 239, "sendfile64" },
     { 240, "futex" },
-    { 241, "sched_setaffinity" },
+    { 241, "sched_setaffinity", ignoreFunc },
     { 242, "sched_getaffinity", ignoreFunc },
     { 243, "set_thread_area", setThreadArea32Func },
     { 244, "get_thread_area" },