mirror of https://gitee.com/openkylin/linux.git
x86/fpu: Remove __fpregs_(de)activate()
Now that fpregs_activate() and fpregs_deactivate() do nothing except call the double underscored versions of themselves, we can get rid of the double underscore version. Signed-off-by: Rik van Riel <riel@redhat.com> Reviewed-by: Andy Lutomirski <luto@kernel.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Quentin Casasnovas <quentin.casasnovas@oracle.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: pbonzini@redhat.com Link: http://lkml.kernel.org/r/1475627678-20788-9-git-send-email-riel@redhat.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
parent
25d83b531c
commit
66f314efca
|
@ -509,8 +509,11 @@ static inline int fpregs_state_valid(struct fpu *fpu, unsigned int cpu)
|
||||||
return fpu == this_cpu_read_stable(fpu_fpregs_owner_ctx) && cpu == fpu->last_cpu;
|
return fpu == this_cpu_read_stable(fpu_fpregs_owner_ctx) && cpu == fpu->last_cpu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
static inline void __fpregs_deactivate(struct fpu *fpu)
|
* These generally need preemption protection to work,
|
||||||
|
* do try to avoid using these on their own:
|
||||||
|
*/
|
||||||
|
static inline void fpregs_deactivate(struct fpu *fpu)
|
||||||
{
|
{
|
||||||
WARN_ON_FPU(!fpu->fpregs_active);
|
WARN_ON_FPU(!fpu->fpregs_active);
|
||||||
|
|
||||||
|
@ -519,7 +522,7 @@ static inline void __fpregs_deactivate(struct fpu *fpu)
|
||||||
trace_x86_fpu_regs_deactivated(fpu);
|
trace_x86_fpu_regs_deactivated(fpu);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void __fpregs_activate(struct fpu *fpu)
|
static inline void fpregs_activate(struct fpu *fpu)
|
||||||
{
|
{
|
||||||
WARN_ON_FPU(fpu->fpregs_active);
|
WARN_ON_FPU(fpu->fpregs_active);
|
||||||
|
|
||||||
|
@ -543,20 +546,6 @@ static inline int fpregs_active(void)
|
||||||
return current->thread.fpu.fpregs_active;
|
return current->thread.fpu.fpregs_active;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* These generally need preemption protection to work,
|
|
||||||
* do try to avoid using these on their own.
|
|
||||||
*/
|
|
||||||
static inline void fpregs_activate(struct fpu *fpu)
|
|
||||||
{
|
|
||||||
__fpregs_activate(fpu);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void fpregs_deactivate(struct fpu *fpu)
|
|
||||||
{
|
|
||||||
__fpregs_deactivate(fpu);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FPU state switching for scheduling.
|
* FPU state switching for scheduling.
|
||||||
*
|
*
|
||||||
|
@ -595,7 +584,7 @@ switch_fpu_prepare(struct fpu *old_fpu, struct fpu *new_fpu, int cpu)
|
||||||
|
|
||||||
/* Don't change CR0.TS if we just switch! */
|
/* Don't change CR0.TS if we just switch! */
|
||||||
if (fpu.preload) {
|
if (fpu.preload) {
|
||||||
__fpregs_activate(new_fpu);
|
fpregs_activate(new_fpu);
|
||||||
trace_x86_fpu_regs_activated(new_fpu);
|
trace_x86_fpu_regs_activated(new_fpu);
|
||||||
prefetch(&new_fpu->state);
|
prefetch(&new_fpu->state);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue