mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
x86/math-emu: Convert to fpstate
Convert math emulation code to the new register storage mechanism in preparation for dynamically sized buffers. No functional change. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lkml.kernel.org/r/20211013145322.711347464@linutronix.de
This commit is contained in:
parent
c20942ce51
commit
63d6bdf36c
@ -53,7 +53,7 @@ void fpstate_init_soft(struct swregs_state *soft)
|
||||
|
||||
void finit(void)
|
||||
{
|
||||
fpstate_init_soft(¤t->thread.fpu.state.soft);
|
||||
fpstate_init_soft(¤t->thread.fpu.fpstate->regs.soft);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -640,7 +640,7 @@ int fpregs_soft_set(struct task_struct *target,
|
||||
unsigned int pos, unsigned int count,
|
||||
const void *kbuf, const void __user *ubuf)
|
||||
{
|
||||
struct swregs_state *s387 = &target->thread.fpu.state.soft;
|
||||
struct swregs_state *s387 = &target->thread.fpu.fpstate->regs.soft;
|
||||
void *space = s387->st_space;
|
||||
int ret;
|
||||
int offset, other, i, tags, regnr, tag, newtop;
|
||||
@ -691,7 +691,7 @@ int fpregs_soft_get(struct task_struct *target,
|
||||
const struct user_regset *regset,
|
||||
struct membuf to)
|
||||
{
|
||||
struct swregs_state *s387 = &target->thread.fpu.state.soft;
|
||||
struct swregs_state *s387 = &target->thread.fpu.fpstate->regs.soft;
|
||||
const void *space = s387->st_space;
|
||||
int offset = (S387->ftop & 7) * 10, other = 80 - offset;
|
||||
|
||||
|
@ -73,7 +73,7 @@ static inline bool seg_writable(struct desc_struct *d)
|
||||
return (d->type & SEG_TYPE_EXECUTE_MASK) == SEG_TYPE_WRITABLE;
|
||||
}
|
||||
|
||||
#define I387 (¤t->thread.fpu.state)
|
||||
#define I387 (¤t->thread.fpu.fpstate->regs)
|
||||
#define FPU_info (I387->soft.info)
|
||||
|
||||
#define FPU_CS (*(unsigned short *) &(FPU_info->regs->cs))
|
||||
|
Loading…
Reference in New Issue
Block a user