From 18badddaa84e13e126f4ca5df47ac55b97a2635a Mon Sep 17 00:00:00 2001 From: Jeff Dike Date: Tue, 16 Oct 2007 01:27:07 -0700 Subject: 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/um/sys-x86_64/signal.c | 6 +++--- arch/um/sys-x86_64/tls.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'arch/um/sys-x86_64') diff --git a/arch/um/sys-x86_64/signal.c b/arch/um/sys-x86_64/signal.c index 9001d17fc3d..c98dd7f3139 100644 --- a/arch/um/sys-x86_64/signal.c +++ b/arch/um/sys-x86_64/signal.c @@ -16,7 +16,7 @@ void copy_sc(struct uml_pt_regs *regs, void *from) struct sigcontext *sc = from; #define GETREG(regs, regno, sc, regname) \ - (regs)->regs[(regno) / sizeof(unsigned long)] = (sc)->regname + (regs)->gp[(regno) / sizeof(unsigned long)] = (sc)->regname GETREG(regs, R8, sc, r8); GETREG(regs, R9, sc, r9); @@ -47,7 +47,7 @@ static int copy_sc_from_user(struct pt_regs *regs, int err = 0; #define GETREG(regs, regno, sc, regname) \ - __get_user((regs)->regs.regs[(regno) / sizeof(unsigned long)], \ + __get_user((regs)->regs.gp[(regno) / sizeof(unsigned long)], \ &(sc)->regname) err |= GETREG(regs, R8, from, r8); @@ -86,7 +86,7 @@ static int copy_sc_to_user(struct sigcontext __user *to, err |= __put_user(0, &to->fs); #define PUTREG(regs, regno, sc, regname) \ - __put_user((regs)->regs.regs[(regno) / sizeof(unsigned long)], \ + __put_user((regs)->regs.gp[(regno) / sizeof(unsigned long)], \ &(sc)->regname) err |= PUTREG(regs, RDI, to, rdi); diff --git a/arch/um/sys-x86_64/tls.c b/arch/um/sys-x86_64/tls.c index 3bd19a51ad6..f7ba46200ec 100644 --- a/arch/um/sys-x86_64/tls.c +++ b/arch/um/sys-x86_64/tls.c @@ -11,7 +11,7 @@ int arch_copy_tls(struct task_struct *t) * (which is argument 5, child_tid, of clone) so it can be set * during context switches. */ - t->thread.arch.fs = t->thread.regs.regs.regs[R8 / sizeof(long)]; + t->thread.arch.fs = t->thread.regs.regs.gp[R8 / sizeof(long)]; return 0; } -- cgit v1.2.3