diff options
author | Rik van Riel <riel@redhat.com> | 2016-10-04 20:34:37 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-10-07 05:14:42 -0400 |
commit | 66f314efca3843a8874405ab015e354d041f86dd (patch) | |
tree | 219890c4a1a55e55b731b2436f8cf590eb0bdc7f | |
parent | 25d83b531c1aa4fca5b4e24ed10f493268f162bc (diff) |
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>
-rw-r--r-- | arch/x86/include/asm/fpu/internal.h | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/arch/x86/include/asm/fpu/internal.h b/arch/x86/include/asm/fpu/internal.h index d2cfe16dd9fa..d0324bcdd3d6 100644 --- a/arch/x86/include/asm/fpu/internal.h +++ b/arch/x86/include/asm/fpu/internal.h | |||
@@ -509,8 +509,11 @@ static inline int fpregs_state_valid(struct fpu *fpu, unsigned int cpu) | |||
509 | return fpu == this_cpu_read_stable(fpu_fpregs_owner_ctx) && cpu == fpu->last_cpu; | 509 | return fpu == this_cpu_read_stable(fpu_fpregs_owner_ctx) && cpu == fpu->last_cpu; |
510 | } | 510 | } |
511 | 511 | ||
512 | 512 | /* | |
513 | static inline void __fpregs_deactivate(struct fpu *fpu) | 513 | * These generally need preemption protection to work, |
514 | * do try to avoid using these on their own: | ||
515 | */ | ||
516 | static inline void fpregs_deactivate(struct fpu *fpu) | ||
514 | { | 517 | { |
515 | WARN_ON_FPU(!fpu->fpregs_active); | 518 | WARN_ON_FPU(!fpu->fpregs_active); |
516 | 519 | ||
@@ -519,7 +522,7 @@ static inline void __fpregs_deactivate(struct fpu *fpu) | |||
519 | trace_x86_fpu_regs_deactivated(fpu); | 522 | trace_x86_fpu_regs_deactivated(fpu); |
520 | } | 523 | } |
521 | 524 | ||
522 | static inline void __fpregs_activate(struct fpu *fpu) | 525 | static inline void fpregs_activate(struct fpu *fpu) |
523 | { | 526 | { |
524 | WARN_ON_FPU(fpu->fpregs_active); | 527 | WARN_ON_FPU(fpu->fpregs_active); |
525 | 528 | ||
@@ -544,20 +547,6 @@ static inline int fpregs_active(void) | |||
544 | } | 547 | } |
545 | 548 | ||
546 | /* | 549 | /* |
547 | * These generally need preemption protection to work, | ||
548 | * do try to avoid using these on their own. | ||
549 | */ | ||
550 | static inline void fpregs_activate(struct fpu *fpu) | ||
551 | { | ||
552 | __fpregs_activate(fpu); | ||
553 | } | ||
554 | |||
555 | static inline void fpregs_deactivate(struct fpu *fpu) | ||
556 | { | ||
557 | __fpregs_deactivate(fpu); | ||
558 | } | ||
559 | |||
560 | /* | ||
561 | * FPU state switching for scheduling. | 550 | * FPU state switching for scheduling. |
562 | * | 551 | * |
563 | * This is a two-stage process: | 552 | * This is a two-stage process: |
@@ -595,7 +584,7 @@ switch_fpu_prepare(struct fpu *old_fpu, struct fpu *new_fpu, int cpu) | |||
595 | 584 | ||
596 | /* Don't change CR0.TS if we just switch! */ | 585 | /* Don't change CR0.TS if we just switch! */ |
597 | if (fpu.preload) { | 586 | if (fpu.preload) { |
598 | __fpregs_activate(new_fpu); | 587 | fpregs_activate(new_fpu); |
599 | trace_x86_fpu_regs_activated(new_fpu); | 588 | trace_x86_fpu_regs_activated(new_fpu); |
600 | prefetch(&new_fpu->state); | 589 | prefetch(&new_fpu->state); |
601 | } | 590 | } |