]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
x86: change percpu_read_stable() to this_cpu_read_stable()
authorAlex Shi <alex.shi@intel.com>
Thu, 3 May 2012 05:43:18 +0000 (15:43 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 3 May 2012 05:46:15 +0000 (15:46 +1000)
It has no function change. It's a preparation for percpu_xxx serial
function change.

Signed-off-by: Alex Shi <alex.shi@intel.com>
Acked-by: Christoph Lameter <cl@gentwo.org>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/x86/include/asm/current.h
arch/x86/include/asm/fpu-internal.h
arch/x86/include/asm/percpu.h
arch/x86/include/asm/thread_info.h

index 4d447b732d82df76b4c55d77fde42cd4024c2971..9476c04ee6357e79ba0a9c59c8b4001d32c653eb 100644 (file)
@@ -11,7 +11,7 @@ DECLARE_PER_CPU(struct task_struct *, current_task);
 
 static __always_inline struct task_struct *get_current(void)
 {
-       return percpu_read_stable(current_task);
+       return this_cpu_read_stable(current_task);
 }
 
 #define current get_current()
index 4fa88154e4dec6d93eaeadbeb1d991a02e57f835..5caaf43b7bd4b2e7b3046c08c213b0620ddcd83f 100644 (file)
@@ -344,7 +344,7 @@ typedef struct { int preload; } fpu_switch_t;
  */
 static inline int fpu_lazy_restore(struct task_struct *new, unsigned int cpu)
 {
-       return new == percpu_read_stable(fpu_owner_task) &&
+       return new == this_cpu_read_stable(fpu_owner_task) &&
                cpu == new->thread.fpu.last_cpu;
 }
 
index 276bbc07f007231ad71edc2b43416188ab296885..8d256ad313e145bf8572a76b3fbc90e065e86100 100644 (file)
@@ -352,15 +352,15 @@ do {                                                                      \
 
 /*
  * percpu_read() makes gcc load the percpu variable every time it is
- * accessed while percpu_read_stable() allows the value to be cached.
- * percpu_read_stable() is more efficient and can be used if its value
+ * accessed while this_cpu_read_stable() allows the value to be cached.
+ * this_cpu_read_stable() is more efficient and can be used if its value
  * is guaranteed to be valid across cpus.  The current users include
  * get_current() and get_thread_info() both of which are actually
  * per-thread variables implemented as per-cpu variables and thus
  * stable for the duration of the respective task.
  */
 #define percpu_read(var)               percpu_from_op("mov", var, "m" (var))
-#define percpu_read_stable(var)                percpu_from_op("mov", var, "p" (&(var)))
+#define this_cpu_read_stable(var)      percpu_from_op("mov", var, "p" (&(var)))
 #define percpu_write(var, val)         percpu_to_op("mov", var, val)
 #define percpu_add(var, val)           percpu_add_op(var, val)
 #define percpu_sub(var, val)           percpu_add_op(var, -(val))
index 0710c11305d49fa94aba2107c0029902c395c8ff..194490d4b73613ff3339e33f804ef68d81da6f1a 100644 (file)
@@ -224,7 +224,7 @@ DECLARE_PER_CPU(unsigned long, kernel_stack);
 static inline struct thread_info *current_thread_info(void)
 {
        struct thread_info *ti;
-       ti = (void *)(percpu_read_stable(kernel_stack) +
+       ti = (void *)(this_cpu_read_stable(kernel_stack) +
                      KERNEL_STACK_OFFSET - THREAD_SIZE);
        return ti;
 }