uml: rename pt_regs general-purpose register file
Before the removal of tt mode, access to a register on the skas-mode side of a pt_regs struct looked like pt_regs.regs.skas.regs.regs[FOO]. This was bad enough, but it became pt_regs.regs.regs.regs[FOO] with the removal of the union from the middle. To get rid of the run of three "regs", the last field is renamed to "gp". Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
6c738ffa9f
commit
18badddaa8
@@ -16,14 +16,14 @@ static unsigned long exec_regs[MAX_REG_NR];
|
||||
|
||||
void init_thread_registers(struct uml_pt_regs *to)
|
||||
{
|
||||
memcpy(to->regs, exec_regs, sizeof(to->regs));
|
||||
memcpy(to->gp, exec_regs, sizeof(to->gp));
|
||||
}
|
||||
|
||||
void save_registers(int pid, struct uml_pt_regs *regs)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = ptrace(PTRACE_GETREGS, pid, 0, regs->regs);
|
||||
err = ptrace(PTRACE_GETREGS, pid, 0, regs->gp);
|
||||
if (err < 0)
|
||||
panic("save_registers - saving registers failed, errno = %d\n",
|
||||
errno);
|
||||
@@ -33,7 +33,7 @@ void restore_registers(int pid, struct uml_pt_regs *regs)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = ptrace(PTRACE_SETREGS, pid, 0, regs->regs);
|
||||
err = ptrace(PTRACE_SETREGS, pid, 0, regs->gp);
|
||||
if (err < 0)
|
||||
panic("restore_registers - saving registers failed, "
|
||||
"errno = %d\n", errno);
|
||||
|
@@ -138,7 +138,7 @@ static void handle_trap(int pid, struct uml_pt_regs *regs,
|
||||
int err, status;
|
||||
|
||||
/* Mark this as a syscall */
|
||||
UPT_SYSCALL_NR(regs) = PT_SYSCALL_NR(regs->regs);
|
||||
UPT_SYSCALL_NR(regs) = PT_SYSCALL_NR(regs->gp);
|
||||
|
||||
if (!local_using_sysemu)
|
||||
{
|
||||
@@ -352,7 +352,7 @@ void userspace(struct uml_pt_regs *regs)
|
||||
|
||||
/* Avoid -ERESTARTSYS handling in host */
|
||||
if (PT_SYSCALL_NR_OFFSET != PT_SYSCALL_RET_OFFSET)
|
||||
PT_SYSCALL_NR(regs->regs) = -1;
|
||||
PT_SYSCALL_NR(regs->gp) = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user