summaryrefslogtreecommitdiffstats
path: root/include/linux/kprobes.h
diff options
context:
space:
mode:
authorChristoph Lameter <cl@linux.com>2010-12-06 11:16:25 -0600
committerTejun Heo <tj@kernel.org>2010-12-17 15:07:19 +0100
commitb76834bc1b6db0a0923eed85c81b1113021b0612 (patch)
treeb68c24d71ad0e6f26b317a2ef03c6139d31b8114 /include/linux/kprobes.h
parent4a6f4fe8377720e5a279fdbb769946c242e936d3 (diff)
downloadlinux-b76834bc1b6db0a0923eed85c81b1113021b0612.tar.gz
linux-b76834bc1b6db0a0923eed85c81b1113021b0612.tar.bz2
linux-b76834bc1b6db0a0923eed85c81b1113021b0612.zip
kprobes: Use this_cpu_ops
Use this_cpu ops in various places to optimize per cpu data access. Cc: Jason Baron <jbaron@redhat.com> Cc: Namhyung Kim <namhyung@gmail.com> Acked-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/kprobes.h')
-rw-r--r--include/linux/kprobes.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
index e7d1b2e0070d..0c251e9f0507 100644
--- a/include/linux/kprobes.h
+++ b/include/linux/kprobes.h
@@ -303,12 +303,12 @@ struct hlist_head * kretprobe_inst_table_head(struct task_struct *tsk);
/* kprobe_running() will just return the current_kprobe on this CPU */
static inline struct kprobe *kprobe_running(void)
{
- return (__get_cpu_var(current_kprobe));
+ return (__this_cpu_read(current_kprobe));
}
static inline void reset_current_kprobe(void)
{
- __get_cpu_var(current_kprobe) = NULL;
+ __this_cpu_write(current_kprobe, NULL);
}
static inline struct kprobe_ctlblk *get_kprobe_ctlblk(void)