Skip to content

Commit

Permalink
x86: x86 i387 user_regset
Browse files Browse the repository at this point in the history
This revamps the i387 code to be shared across 32-bit, 64-bit,
and 32-on-64.  It does so by consolidating the code in one place
based on the user_regset accessor interfaces.  This switches
32-bit to using the i387_64.h header and 64-bit to using the
i387.c that was previously i387_32.c, but that's what took the
least cleanup in each file.  Here i387.h is stubbed to always
include i387_64.h rather than renaming the file, to keep this
diff smaller and easier to read.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Roland McGrath authored and Ingo Molnar committed Jan 30, 2008
1 parent b7b7172 commit 4421011
Show file tree
Hide file tree
Showing 8 changed files with 265 additions and 254 deletions.
2 changes: 1 addition & 1 deletion arch/x86/ia32/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

obj-$(CONFIG_IA32_EMULATION) := ia32entry.o sys_ia32.o ia32_signal.o \
ia32_binfmt.o fpu32.o
ia32_binfmt.o

sysv-$(CONFIG_SYSVIPC) := ipc32.o
obj-$(CONFIG_IA32_EMULATION) += $(sysv-y)
Expand Down
5 changes: 2 additions & 3 deletions arch/x86/ia32/ia32_signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include <asm/ia32_unistd.h>
#include <asm/user32.h>
#include <asm/sigcontext32.h>
#include <asm/fpu32.h>
#include <asm/proto.h>
#include <asm/vdso.h>

Expand Down Expand Up @@ -258,7 +257,7 @@ static int ia32_restore_sigcontext(struct pt_regs *regs,
if (buf) {
if (!access_ok(VERIFY_READ, buf, sizeof(*buf)))
goto badframe;
err |= restore_i387_ia32(current, buf, 0);
err |= restore_i387_ia32(buf);
} else {
struct task_struct *me = current;

Expand Down Expand Up @@ -377,7 +376,7 @@ static int ia32_setup_sigcontext(struct sigcontext_ia32 __user *sc,
err |= __put_user((u32)regs->flags, &sc->flags);
err |= __put_user((u32)regs->sp, &sc->sp_at_signal);

tmp = save_i387_ia32(current, fpstate, regs, 0);
tmp = save_i387_ia32(fpstate);
if (tmp < 0)
err = -EFAULT;
else {
Expand Down
3 changes: 2 additions & 1 deletion arch/x86/kernel/Makefile_64
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CPPFLAGS_vmlinux.lds += -Ux86_64

obj-y := process_64.o signal_64.o entry_64.o traps_64.o irq_64.o \
time_64.o ioport_64.o ldt.o setup_64.o i8259_64.o sys_x86_64.o \
x8664_ksyms_64.o i387_64.o syscall_64.o vsyscall_64.o \
x8664_ksyms_64.o syscall_64.o vsyscall_64.o \
setup64.o bootflag.o e820_64.o reboot_64.o quirks.o i8237.o \
pci-dma_64.o pci-nommu_64.o alternative.o hpet.o tsc_64.o bugs_64.o \
i8253.o io_delay.o rtc.o
Expand All @@ -16,6 +16,7 @@ obj-y += ptrace.o
obj-y += ds.o
obj-y += step.o

obj-y += i387.o
obj-$(CONFIG_IA32_EMULATION) += tls.o
obj-$(CONFIG_STACKTRACE) += stacktrace.o
obj-y += cpu/
Expand Down
Loading

0 comments on commit 4421011

Please sign in to comment.