kernel/userspace: Move syscall_frame field to thread struct
The syscall exception frame was stored on the CPU struct during
syscall execution, but that's not right. System calls might "feel
like" exceptions, but they're actually perfectly normal kernel mode
code and can be preempted and migrated between CPUs at any time.
Put the field on the thread struct.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
diff --git a/scripts/gen_syscalls.py b/scripts/gen_syscalls.py
index 2e75bd5..ae7e250 100755
--- a/scripts/gen_syscalls.py
+++ b/scripts/gen_syscalls.py
@@ -255,7 +255,7 @@
else:
mrsh += "\t\t" + "uintptr_t arg3, uintptr_t arg4, void *more, void *ssf)\n"
mrsh += "{\n"
- mrsh += "\t" + "_current_cpu->syscall_frame = ssf;\n"
+ mrsh += "\t" + "_current->syscall_frame = ssf;\n"
for unused_arg in range(nmrsh, 6):
mrsh += "\t(void) arg%d;\t/* unused */\n" % unused_arg