arch: Use ignoreWarnOnceFunc instead of the WarnOnce flag.
authorGabe Black <gabeblack@google.com>
Sat, 23 Nov 2019 00:00:51 +0000 (16:00 -0800)
committerGabe Black <gabeblack@google.com>
Tue, 10 Dec 2019 23:58:14 +0000 (23:58 +0000)
Jira Issue: https://gem5.atlassian.net/browse/GEM5-187

Change-Id: I9bbffcc74ec4f3df4effa5c50f0a4a688c5b6016
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23169
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

src/arch/arm/linux/process.cc
src/arch/riscv/linux/process.cc
src/arch/x86/linux/process.cc

index ca8e00c71a72449985409a4a28559bf5f0650ee5..d3d0e85be316489fef7d229383fb1f94042717d7 100644 (file)
@@ -291,7 +291,7 @@ static SyscallDesc syscallDescs32[] = {
     /* 123 */ SyscallDesc("unused#123", unimplementedFunc),
     /* 124 */ SyscallDesc("adjtimex", unimplementedFunc),
     /* 125 */ SyscallDesc("mprotect", ignoreFunc),
-    /* 126 */ SyscallDesc("sigprocmask", ignoreFunc, SyscallDesc::WarnOnce),
+    /* 126 */ SyscallDesc("sigprocmask", ignoreWarnOnceFunc),
     /* 127 */ SyscallDesc("unused#127", unimplementedFunc),
     /* 128 */ SyscallDesc("init_module", unimplementedFunc),
     /* 129 */ SyscallDesc("delete_module", unimplementedFunc),
@@ -331,7 +331,7 @@ static SyscallDesc syscallDescs32[] = {
     /* 159 */ SyscallDesc("sched_get_priority_max", unimplementedFunc),
     /* 160 */ SyscallDesc("sched_get_priority_min", unimplementedFunc),
     /* 161 */ SyscallDesc("sched_rr_get_interval", unimplementedFunc),
-    /* 162 */ SyscallDesc("nanosleep", ignoreFunc, SyscallDesc::WarnOnce),
+    /* 162 */ SyscallDesc("nanosleep", ignoreWarnOnceFunc),
     /* 163 */ SyscallDesc("mremap", mremapFunc<ArmLinux32>), // ARM-specific
     /* 164 */ SyscallDesc("setresuid", unimplementedFunc),
     /* 165 */ SyscallDesc("getresuid", unimplementedFunc),
@@ -343,8 +343,8 @@ static SyscallDesc syscallDescs32[] = {
     /* 171 */ SyscallDesc("getresgid", unimplementedFunc),
     /* 172 */ SyscallDesc("prctl", unimplementedFunc),
     /* 173 */ SyscallDesc("rt_sigreturn", unimplementedFunc),
-    /* 174 */ SyscallDesc("rt_sigaction", ignoreFunc, SyscallDesc::WarnOnce),
-    /* 175 */ SyscallDesc("rt_sigprocmask", ignoreFunc, SyscallDesc::WarnOnce),
+    /* 174 */ SyscallDesc("rt_sigaction", ignoreWarnOnceFunc),
+    /* 175 */ SyscallDesc("rt_sigprocmask", ignoreWarnOnceFunc),
     /* 176 */ SyscallDesc("rt_sigpending", unimplementedFunc),
     /* 177 */ SyscallDesc("rt_sigtimedwait", unimplementedFunc),
     /* 178 */ SyscallDesc("rt_sigqueueinfo", ignoreFunc),
@@ -647,7 +647,7 @@ static SyscallDesc syscallDescs64[] = {
     /*   98 */ SyscallDesc("futex", futexFunc<ArmLinux64>),
     /*   99 */ SyscallDesc("set_robust_list", ignoreFunc),
     /*  100 */ SyscallDesc("get_robust_list", unimplementedFunc),
-    /*  101 */ SyscallDesc("nanosleep", ignoreFunc, SyscallDesc::WarnOnce),
+    /*  101 */ SyscallDesc("nanosleep", ignoreWarnOnceFunc),
     /*  102 */ SyscallDesc("getitimer", unimplementedFunc),
     /*  103 */ SyscallDesc("setitimer", unimplementedFunc),
     /*  104 */ SyscallDesc("kexec_load", unimplementedFunc),
@@ -681,7 +681,7 @@ static SyscallDesc syscallDescs64[] = {
     /*  132 */ SyscallDesc("sigaltstack", unimplementedFunc),
     /*  133 */ SyscallDesc("rt_sigsuspend", unimplementedFunc),
     /*  134 */ SyscallDesc("rt_sigaction", ignoreFunc),
-    /*  135 */ SyscallDesc("rt_sigprocmask", ignoreFunc, SyscallDesc::WarnOnce),
+    /*  135 */ SyscallDesc("rt_sigprocmask", ignoreWarnOnceFunc),
     /*  136 */ SyscallDesc("rt_sigpending", unimplementedFunc),
     /*  137 */ SyscallDesc("rt_sigtimedwait", unimplementedFunc),
     /*  138 */ SyscallDesc("rt_sigqueueinfo", ignoreFunc),
index 4a16f77f716ad61d2e54943ac5f5a85457c04d89..d6a41e240026969d2da773b7d46af41bef277ef2 100644 (file)
@@ -221,9 +221,9 @@ std::map<int, SyscallDesc> RiscvLinuxProcess64::syscallDescs = {
     {96,   SyscallDesc("set_tid_address", setTidAddressFunc)},
     {97,   SyscallDesc("unshare")},
     {98,   SyscallDesc("futex", futexFunc<RiscvLinux64>)},
-    {99,   SyscallDesc("set_robust_list", ignoreFunc, SyscallDesc::WarnOnce)},
-    {100,  SyscallDesc("get_robust_list", ignoreFunc, SyscallDesc::WarnOnce)},
-    {101,  SyscallDesc("nanosleep", ignoreFunc, SyscallDesc::WarnOnce)},
+    {99,   SyscallDesc("set_robust_list", ignoreWarnOnceFunc)},
+    {100,  SyscallDesc("get_robust_list", ignoreWarnOnceFunc)},
+    {101,  SyscallDesc("nanosleep", ignoreWarnOnceFunc)},
     {102,  SyscallDesc("getitimer")},
     {103,  SyscallDesc("setitimer")},
     {104,  SyscallDesc("kexec_load")},
@@ -246,7 +246,7 @@ std::map<int, SyscallDesc> RiscvLinuxProcess64::syscallDescs = {
     {121,  SyscallDesc("sched_getparam")},
     {122,  SyscallDesc("sched_setaffinity")},
     {123,  SyscallDesc("sched_getaffinity")},
-    {124,  SyscallDesc("sched_yield", ignoreFunc, SyscallDesc::WarnOnce)},
+    {124,  SyscallDesc("sched_yield", ignoreWarnOnceFunc)},
     {125,  SyscallDesc("sched_get_priority_max")},
     {126,  SyscallDesc("sched_get_priority_min")},
     {127,  SyscallDesc("scheD_rr_get_interval")},
@@ -255,13 +255,13 @@ std::map<int, SyscallDesc> RiscvLinuxProcess64::syscallDescs = {
     {130,  SyscallDesc("tkill")},
     {131,  SyscallDesc("tgkill", tgkillFunc<RiscvLinux64>)},
     {132,  SyscallDesc("sigaltstack")},
-    {133,  SyscallDesc("rt_sigsuspend", ignoreFunc, SyscallDesc::WarnOnce)},
-    {134,  SyscallDesc("rt_sigaction", ignoreFunc, SyscallDesc::WarnOnce)},
-    {135,  SyscallDesc("rt_sigprocmask", ignoreFunc, SyscallDesc::WarnOnce)},
-    {136,  SyscallDesc("rt_sigpending", ignoreFunc, SyscallDesc::WarnOnce)},
-    {137,  SyscallDesc("rt_sigtimedwait", ignoreFunc,SyscallDesc::WarnOnce)},
-    {138,  SyscallDesc("rt_sigqueueinfo", ignoreFunc,SyscallDesc::WarnOnce)},
-    {139,  SyscallDesc("rt_sigreturn", ignoreFunc, SyscallDesc::WarnOnce)},
+    {133,  SyscallDesc("rt_sigsuspend", ignoreWarnOnceFunc)},
+    {134,  SyscallDesc("rt_sigaction", ignoreWarnOnceFunc)},
+    {135,  SyscallDesc("rt_sigprocmask", ignoreWarnOnceFunc)},
+    {136,  SyscallDesc("rt_sigpending", ignoreWarnOnceFunc)},
+    {137,  SyscallDesc("rt_sigtimedwait", ignoreWarnOnceFunc)},
+    {138,  SyscallDesc("rt_sigqueueinfo", ignoreWarnOnceFunc)},
+    {139,  SyscallDesc("rt_sigreturn", ignoreWarnOnceFunc)},
     {140,  SyscallDesc("setpriority")},
     {141,  SyscallDesc("getpriority")},
     {142,  SyscallDesc("reboot")},
@@ -552,8 +552,8 @@ std::map<int, SyscallDesc> RiscvLinuxProcess32::syscallDescs = {
     {96,   SyscallDesc("set_tid_address", setTidAddressFunc)},
     {97,   SyscallDesc("unshare")},
     {98,   SyscallDesc("futex", futexFunc<RiscvLinux32>)},
-    {99,   SyscallDesc("set_robust_list", ignoreFunc, SyscallDesc::WarnOnce)},
-    {100,  SyscallDesc("get_robust_list", ignoreFunc, SyscallDesc::WarnOnce)},
+    {99,   SyscallDesc("set_robust_list", ignoreWarnOnceFunc)},
+    {100,  SyscallDesc("get_robust_list", ignoreWarnOnceFunc)},
     {101,  SyscallDesc("nanosleep")},
     {102,  SyscallDesc("getitimer")},
     {103,  SyscallDesc("setitimer")},
@@ -577,7 +577,7 @@ std::map<int, SyscallDesc> RiscvLinuxProcess32::syscallDescs = {
     {121,  SyscallDesc("sched_getparam")},
     {122,  SyscallDesc("sched_setaffinity")},
     {123,  SyscallDesc("sched_getaffinity")},
-    {124,  SyscallDesc("sched_yield", ignoreFunc, SyscallDesc::WarnOnce)},
+    {124,  SyscallDesc("sched_yield", ignoreWarnOnceFunc)},
     {125,  SyscallDesc("sched_get_priority_max")},
     {126,  SyscallDesc("sched_get_priority_min")},
     {127,  SyscallDesc("scheD_rr_get_interval")},
@@ -586,13 +586,13 @@ std::map<int, SyscallDesc> RiscvLinuxProcess32::syscallDescs = {
     {130,  SyscallDesc("tkill")},
     {131,  SyscallDesc("tgkill", tgkillFunc<RiscvLinux32>)},
     {132,  SyscallDesc("sigaltstack")},
-    {133,  SyscallDesc("rt_sigsuspend", ignoreFunc, SyscallDesc::WarnOnce)},
-    {134,  SyscallDesc("rt_sigaction", ignoreFunc, SyscallDesc::WarnOnce)},
-    {135,  SyscallDesc("rt_sigprocmask", ignoreFunc, SyscallDesc::WarnOnce)},
-    {136,  SyscallDesc("rt_sigpending", ignoreFunc, SyscallDesc::WarnOnce)},
-    {137,  SyscallDesc("rt_sigtimedwait", ignoreFunc,SyscallDesc::WarnOnce)},
-    {138,  SyscallDesc("rt_sigqueueinfo", ignoreFunc,SyscallDesc::WarnOnce)},
-    {139,  SyscallDesc("rt_sigreturn", ignoreFunc, SyscallDesc::WarnOnce)},
+    {133,  SyscallDesc("rt_sigsuspend", ignoreWarnOnceFunc)},
+    {134,  SyscallDesc("rt_sigaction", ignoreWarnOnceFunc)},
+    {135,  SyscallDesc("rt_sigprocmask", ignoreWarnOnceFunc)},
+    {136,  SyscallDesc("rt_sigpending", ignoreWarnOnceFunc)},
+    {137,  SyscallDesc("rt_sigtimedwait", ignoreWarnOnceFunc)},
+    {138,  SyscallDesc("rt_sigqueueinfo", ignoreWarnOnceFunc)},
+    {139,  SyscallDesc("rt_sigreturn", ignoreWarnOnceFunc)},
     {140,  SyscallDesc("setpriority")},
     {141,  SyscallDesc("getpriority")},
     {142,  SyscallDesc("reboot")},
index dfb1c42f89fa40460687c58803e225a419d1c5bd..6befafde42dcac2d0beac5b1cd0ba4419df0fff1 100644 (file)
@@ -271,8 +271,8 @@ static SyscallDesc syscallDescs64[] = {
     /*  10 */ SyscallDesc("mprotect", ignoreFunc),
     /*  11 */ SyscallDesc("munmap", munmapFunc),
     /*  12 */ SyscallDesc("brk", brkFunc),
-    /*  13 */ SyscallDesc("rt_sigaction", ignoreFunc, SyscallDesc::WarnOnce),
-    /*  14 */ SyscallDesc("rt_sigprocmask", ignoreFunc, SyscallDesc::WarnOnce),
+    /*  13 */ SyscallDesc("rt_sigaction", ignoreWarnOnceFunc),
+    /*  14 */ SyscallDesc("rt_sigprocmask", ignoreWarnOnceFunc),
     /*  15 */ SyscallDesc("rt_sigreturn", unimplementedFunc),
     /*  16 */ SyscallDesc("ioctl", ioctlFunc<X86Linux64>),
     /*  17 */ SyscallDesc("pread64", unimplementedFunc),
@@ -293,7 +293,7 @@ static SyscallDesc syscallDescs64[] = {
     /*  32 */ SyscallDesc("dup", dupFunc),
     /*  33 */ SyscallDesc("dup2", dup2Func),
     /*  34 */ SyscallDesc("pause", unimplementedFunc),
-    /*  35 */ SyscallDesc("nanosleep", ignoreFunc, SyscallDesc::WarnOnce),
+    /*  35 */ SyscallDesc("nanosleep", ignoreWarnOnceFunc),
     /*  36 */ SyscallDesc("getitimer", unimplementedFunc),
     /*  37 */ SyscallDesc("alarm", unimplementedFunc),
     /*  38 */ SyscallDesc("setitimer", unimplementedFunc),