From: Alex Shi <alex.shi@intel.com>
To: linux-kernel@vger.kernel.org, cl@gentwo.org,
eric.dumazet@gmail.com, tglx@linutronix.de, avi@redhat.com,
akpm@linux-foundation.org, davem@davemloft.net, kaber@trash.net,
a.p.zijlstra@chello.nl, ying.huang@intel.com,
honrad.wilk@oracle.com, hpa@zytor.com, jeremy@goop.org
Subject: [PATCH v2 4/5] x86: change percpu_read_stable to this_cpu_read_stable
Date: Fri, 13 Jan 2012 23:45:19 +0800 [thread overview]
Message-ID: <1326469520-21239-5-git-send-email-alex.shi@intel.com> (raw)
In-Reply-To: <1326469520-21239-4-git-send-email-alex.shi@intel.com>
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>
---
arch/x86/include/asm/current.h | 2 +-
arch/x86/include/asm/percpu.h | 6 +++---
arch/x86/include/asm/thread_info.h | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/x86/include/asm/current.h b/arch/x86/include/asm/current.h
index 4d447b7..9476c04 100644
--- a/arch/x86/include/asm/current.h
+++ b/arch/x86/include/asm/current.h
@@ -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()
diff --git a/arch/x86/include/asm/percpu.h b/arch/x86/include/asm/percpu.h
index 276bbc0..8d256ad 100644
--- a/arch/x86/include/asm/percpu.h
+++ b/arch/x86/include/asm/percpu.h
@@ -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))
diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h
index bc817cd..3544992 100644
--- a/arch/x86/include/asm/thread_info.h
+++ b/arch/x86/include/asm/thread_info.h
@@ -218,7 +218,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;
}
--
1.6.3.3
next prev parent reply other threads:[~2012-01-13 15:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-13 15:45 [PATH v2 0/5] Code clean up for percpu_xxx serial functions Alex Shi
2012-01-13 15:45 ` [PATCH v2 1/5] net: use this_cpu_xxx replace percpu_xxx funcs Alex Shi
2012-01-13 15:45 ` [PATCH v2 2/5] xen: " Alex Shi
2012-01-13 15:45 ` [PATCH v2 3/5] x86: " Alex Shi
2012-01-13 15:45 ` Alex Shi [this message]
2012-01-13 15:45 ` [PATCH v2 5/5] x86: Code clean up for percpu_xxx() functions Alex Shi
2012-01-13 15:53 [PATH v2 0/5] Code clean up for percpu_xxx serial functions Alex Shi
2012-01-13 15:53 ` [PATCH v2 1/5] net: use this_cpu_xxx replace percpu_xxx funcs Alex Shi
2012-01-13 15:53 ` [PATCH v2 2/5] xen: " Alex Shi
2012-01-13 15:53 ` [PATCH v2 3/5] x86: " Alex Shi
2012-01-13 15:53 ` [PATCH v2 4/5] x86: change percpu_read_stable to this_cpu_read_stable Alex Shi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1326469520-21239-5-git-send-email-alex.shi@intel.com \
--to=alex.shi@intel.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=avi@redhat.com \
--cc=cl@gentwo.org \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=honrad.wilk@oracle.com \
--cc=hpa@zytor.com \
--cc=jeremy@goop.org \
--cc=kaber@trash.net \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=ying.huang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).