diff options
author | Christoph Lameter <cl@linux.com> | 2010-12-06 11:16:25 -0600 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2010-12-17 15:07:19 +0100 |
commit | b76834bc1b6db0a0923eed85c81b1113021b0612 (patch) | |
tree | b68c24d71ad0e6f26b317a2ef03c6139d31b8114 /kernel/kprobes.c | |
parent | 4a6f4fe8377720e5a279fdbb769946c242e936d3 (diff) | |
download | linux-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 'kernel/kprobes.c')
-rw-r--r-- | kernel/kprobes.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 9737a76e106f..732f1e9b65ee 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -317,12 +317,12 @@ void __kprobes free_optinsn_slot(kprobe_opcode_t * slot, int dirty) /* We have preemption disabled.. so it is safe to use __ versions */ static inline void set_kprobe_instance(struct kprobe *kp) { - __get_cpu_var(kprobe_instance) = kp; + __this_cpu_write(kprobe_instance, kp); } static inline void reset_kprobe_instance(void) { - __get_cpu_var(kprobe_instance) = NULL; + __this_cpu_write(kprobe_instance, NULL); } /* @@ -775,7 +775,7 @@ static void __kprobes aggr_post_handler(struct kprobe *p, struct pt_regs *regs, static int __kprobes aggr_fault_handler(struct kprobe *p, struct pt_regs *regs, int trapnr) { - struct kprobe *cur = __get_cpu_var(kprobe_instance); + struct kprobe *cur = __this_cpu_read(kprobe_instance); /* * if we faulted "during" the execution of a user specified @@ -790,7 +790,7 @@ static int __kprobes aggr_fault_handler(struct kprobe *p, struct pt_regs *regs, static int __kprobes aggr_break_handler(struct kprobe *p, struct pt_regs *regs) { - struct kprobe *cur = __get_cpu_var(kprobe_instance); + struct kprobe *cur = __this_cpu_read(kprobe_instance); int ret = 0; if (cur && cur->break_handler) { |