diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-01-30 07:30:56 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:30:56 -0500 |
commit | 742fa54a62be6a263df14a553bf832724471dfbe (patch) | |
tree | 991589593b078eb2ede035f511e4b85b11b95a9c /arch/x86/kernel/signal_32.c | |
parent | 153d5f2e5787c74e9cbb6b6687c9b04be1b59893 (diff) |
x86: use generic register names in struct sigcontext
Switch struct sigcontext (defined in <asm/sigcontext*.h>) to using
register names withut e- or r-prefixes for both 32- and 64-bit x86.
This is intended as a preliminary step in unifying this code between
architectures.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/signal_32.c')
-rw-r--r-- | arch/x86/kernel/signal_32.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c index 40fd3515ccf1..64cb3c05de69 100644 --- a/arch/x86/kernel/signal_32.c +++ b/arch/x86/kernel/signal_32.c | |||
@@ -105,7 +105,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, int *peax | |||
105 | /* Always make any pending restarted system calls return -EINTR */ | 105 | /* Always make any pending restarted system calls return -EINTR */ |
106 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 106 | current_thread_info()->restart_block.fn = do_no_restart_syscall; |
107 | 107 | ||
108 | #define COPY(x) err |= __get_user(regs->x, &sc->e ## x) | 108 | #define COPY(x) err |= __get_user(regs->x, &sc->x) |
109 | 109 | ||
110 | #define COPY_SEG(seg) \ | 110 | #define COPY_SEG(seg) \ |
111 | { unsigned short tmp; \ | 111 | { unsigned short tmp; \ |
@@ -144,7 +144,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, int *peax | |||
144 | 144 | ||
145 | { | 145 | { |
146 | unsigned int tmpflags; | 146 | unsigned int tmpflags; |
147 | err |= __get_user(tmpflags, &sc->eflags); | 147 | err |= __get_user(tmpflags, &sc->flags); |
148 | regs->flags = (regs->flags & ~FIX_EFLAGS) | (tmpflags & FIX_EFLAGS); | 148 | regs->flags = (regs->flags & ~FIX_EFLAGS) | (tmpflags & FIX_EFLAGS); |
149 | regs->orig_ax = -1; /* disable syscall checks */ | 149 | regs->orig_ax = -1; /* disable syscall checks */ |
150 | } | 150 | } |
@@ -165,7 +165,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, int *peax | |||
165 | } | 165 | } |
166 | } | 166 | } |
167 | 167 | ||
168 | err |= __get_user(*peax, &sc->eax); | 168 | err |= __get_user(*peax, &sc->ax); |
169 | return err; | 169 | return err; |
170 | 170 | ||
171 | badframe: | 171 | badframe: |
@@ -256,20 +256,20 @@ setup_sigcontext(struct sigcontext __user *sc, struct _fpstate __user *fpstate, | |||
256 | 256 | ||
257 | err |= __put_user(regs->es, (unsigned int __user *)&sc->es); | 257 | err |= __put_user(regs->es, (unsigned int __user *)&sc->es); |
258 | err |= __put_user(regs->ds, (unsigned int __user *)&sc->ds); | 258 | err |= __put_user(regs->ds, (unsigned int __user *)&sc->ds); |
259 | err |= __put_user(regs->di, &sc->edi); | 259 | err |= __put_user(regs->di, &sc->di); |
260 | err |= __put_user(regs->si, &sc->esi); | 260 | err |= __put_user(regs->si, &sc->si); |
261 | err |= __put_user(regs->bp, &sc->ebp); | 261 | err |= __put_user(regs->bp, &sc->bp); |
262 | err |= __put_user(regs->sp, &sc->esp); | 262 | err |= __put_user(regs->sp, &sc->sp); |
263 | err |= __put_user(regs->bx, &sc->ebx); | 263 | err |= __put_user(regs->bx, &sc->bx); |
264 | err |= __put_user(regs->dx, &sc->edx); | 264 | err |= __put_user(regs->dx, &sc->dx); |
265 | err |= __put_user(regs->cx, &sc->ecx); | 265 | err |= __put_user(regs->cx, &sc->cx); |
266 | err |= __put_user(regs->ax, &sc->eax); | 266 | err |= __put_user(regs->ax, &sc->ax); |
267 | err |= __put_user(current->thread.trap_no, &sc->trapno); | 267 | err |= __put_user(current->thread.trap_no, &sc->trapno); |
268 | err |= __put_user(current->thread.error_code, &sc->err); | 268 | err |= __put_user(current->thread.error_code, &sc->err); |
269 | err |= __put_user(regs->ip, &sc->eip); | 269 | err |= __put_user(regs->ip, &sc->ip); |
270 | err |= __put_user(regs->cs, (unsigned int __user *)&sc->cs); | 270 | err |= __put_user(regs->cs, (unsigned int __user *)&sc->cs); |
271 | err |= __put_user(regs->flags, &sc->eflags); | 271 | err |= __put_user(regs->flags, &sc->flags); |
272 | err |= __put_user(regs->sp, &sc->esp_at_signal); | 272 | err |= __put_user(regs->sp, &sc->sp_at_signal); |
273 | err |= __put_user(regs->ss, (unsigned int __user *)&sc->ss); | 273 | err |= __put_user(regs->ss, (unsigned int __user *)&sc->ss); |
274 | 274 | ||
275 | tmp = save_i387(fpstate); | 275 | tmp = save_i387(fpstate); |