]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
x86/fpu: Rename math_state_restore() to fpu__restore()
authorIngo Molnar <mingo@kernel.org>
Wed, 22 Apr 2015 11:16:47 +0000 (13:16 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 19 May 2015 13:47:18 +0000 (15:47 +0200)
Move to the new fpu__*() namespace.

Reviewed-by: Borislav Petkov <bp@alien8.de>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Documentation/preempt-locking.txt
arch/x86/include/asm/i387.h
arch/x86/kernel/fpu/core.c
arch/x86/kernel/fpu/xsave.c
arch/x86/kernel/process_32.c
arch/x86/kernel/process_64.c
arch/x86/kernel/traps.c
drivers/lguest/x86/core.c

index 57883ca2498bb5ce818139a73755518e78150df9..e89ce6624af2fab481a708ad1a0e4e20d1bc0c1c 100644 (file)
@@ -48,7 +48,7 @@ preemption must be disabled around such regions.
 
 Note, some FPU functions are already explicitly preempt safe.  For example,
 kernel_fpu_begin and kernel_fpu_end will disable and enable preemption.
-However, math_state_restore must be called with preemption disabled.
+However, fpu__restore() must be called with preemption disabled.
 
 
 RULE #3: Lock acquire and release must be performed by same task
index d6fc84440b73b37564fbf5988d40c514ba7d1340..c8ee395dd6c6b96a6040f4ddef80e269478fb6ad 100644 (file)
@@ -23,7 +23,7 @@ extern void fpstate_init(struct fpu *fpu);
 extern void fpu__flush_thread(struct task_struct *tsk);
 
 extern int dump_fpu(struct pt_regs *, struct user_i387_struct *);
-extern void math_state_restore(void);
+extern void fpu__restore(void);
 
 extern bool irq_fpu_usable(void);
 
index 7add2fb7369e2d143b0eb55e4b868327efbb7ac4..15c3cf7bd1600975259d42277fdddf56c40db884 100644 (file)
@@ -228,7 +228,7 @@ static int fpu__unlazy_stopped(struct task_struct *child)
 }
 
 /*
- * 'math_state_restore()' saves the current math information in the
+ * 'fpu__restore()' saves the current math information in the
  * old math state array, and gets the new ones from the current task
  *
  * Careful.. There are problems with IBM-designed IRQ13 behaviour.
@@ -237,7 +237,7 @@ static int fpu__unlazy_stopped(struct task_struct *child)
  * Must be called with kernel preemption disabled (eg with local
  * local interrupts as in the case of do_device_not_available).
  */
-void math_state_restore(void)
+void fpu__restore(void)
 {
        struct task_struct *tsk = current;
 
@@ -267,7 +267,7 @@ void math_state_restore(void)
        }
        kernel_fpu_enable();
 }
-EXPORT_SYMBOL_GPL(math_state_restore);
+EXPORT_SYMBOL_GPL(fpu__restore);
 
 void fpu__flush_thread(struct task_struct *tsk)
 {
index 163b5cc582efed46e21a42a85c7d50a51704f482..d913d5024901c82cd7aaa1ce3f8f97410bc36505 100644 (file)
@@ -404,7 +404,7 @@ int __restore_xstate_sig(void __user *buf, void __user *buf_fx, int size)
                set_used_math();
                if (use_eager_fpu()) {
                        preempt_disable();
-                       math_state_restore();
+                       fpu__restore();
                        preempt_enable();
                }
 
index 84d647d4b14d16db388fd20fcda497412b3a328b..1a0edce626b2dde1eff9d2aec4e2aaef13fe313a 100644 (file)
@@ -295,7 +295,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
         * Leave lazy mode, flushing any hypercalls made here.
         * This must be done before restoring TLS segments so
         * the GDT and LDT are properly updated, and must be
-        * done before math_state_restore, so the TS bit is up
+        * done before fpu__restore(), so the TS bit is up
         * to date.
         */
        arch_end_context_switch(next_p);
index ae6efeccb46e7d537e3249beeed4f1c051a8be60..99cc4b8589ad1e81cda19f24b5d78c39e78e2763 100644 (file)
@@ -298,7 +298,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
         * Leave lazy mode, flushing any hypercalls made here.  This
         * must be done after loading TLS entries in the GDT but before
         * loading segments that might reference them, and and it must
-        * be done before math_state_restore, so the TS bit is up to
+        * be done before fpu__restore(), so the TS bit is up to
         * date.
         */
        arch_end_context_switch(next_p);
index 63c7fc3677b46c13f9e86575c12b3084195ed526..22ad90a40dbf17f7e39407e8c7a0820b65159ee0 100644 (file)
@@ -846,7 +846,7 @@ do_device_not_available(struct pt_regs *regs, long error_code)
                return;
        }
 #endif
-       math_state_restore(); /* interrupts still off */
+       fpu__restore(); /* interrupts still off */
 #ifdef CONFIG_X86_32
        conditional_sti(regs);
 #endif
index 30f2aef69d787d7245b3e91c53b98a0a0216cdb9..bcb534a5512d6b1e5c517b11146e4c3e42765bb8 100644 (file)
@@ -297,12 +297,12 @@ void lguest_arch_run_guest(struct lg_cpu *cpu)
        /*
         * Similarly, if we took a trap because the Guest used the FPU,
         * we have to restore the FPU it expects to see.
-        * math_state_restore() may sleep and we may even move off to
+        * fpu__restore() may sleep and we may even move off to
         * a different CPU. So all the critical stuff should be done
         * before this.
         */
        else if (cpu->regs->trapnum == 7 && !user_has_fpu())
-               math_state_restore();
+               fpu__restore();
 }
 
 /*H:130