diff options
author | Christoph Lameter <cl@linux.com> | 2010-12-06 12:16:25 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2010-12-17 09:07:19 -0500 |
commit | b76834bc1b6db0a0923eed85c81b1113021b0612 (patch) | |
tree | b68c24d71ad0e6f26b317a2ef03c6139d31b8114 /kernel | |
parent | 4a6f4fe8377720e5a279fdbb769946c242e936d3 (diff) |
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')
-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) | |||
317 | /* We have preemption disabled.. so it is safe to use __ versions */ | 317 | /* We have preemption disabled.. so it is safe to use __ versions */ |
318 | static inline void set_kprobe_instance(struct kprobe *kp) | 318 | static inline void set_kprobe_instance(struct kprobe *kp) |
319 | { | 319 | { |
320 | __get_cpu_var(kprobe_instance) = kp; | 320 | __this_cpu_write(kprobe_instance, kp); |
321 | } | 321 | } |
322 | 322 | ||
323 | static inline void reset_kprobe_instance(void) | 323 | static inline void reset_kprobe_instance(void) |
324 | { | 324 | { |
325 | __get_cpu_var(kprobe_instance) = NULL; | 325 | __this_cpu_write(kprobe_instance, NULL); |
326 | } | 326 | } |
327 | 327 | ||
328 | /* | 328 | /* |
@@ -775,7 +775,7 @@ static void __kprobes aggr_post_handler(struct kprobe *p, struct pt_regs *regs, | |||
775 | static int __kprobes aggr_fault_handler(struct kprobe *p, struct pt_regs *regs, | 775 | static int __kprobes aggr_fault_handler(struct kprobe *p, struct pt_regs *regs, |
776 | int trapnr) | 776 | int trapnr) |
777 | { | 777 | { |
778 | struct kprobe *cur = __get_cpu_var(kprobe_instance); | 778 | struct kprobe *cur = __this_cpu_read(kprobe_instance); |
779 | 779 | ||
780 | /* | 780 | /* |
781 | * if we faulted "during" the execution of a user specified | 781 | * 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, | |||
790 | 790 | ||
791 | static int __kprobes aggr_break_handler(struct kprobe *p, struct pt_regs *regs) | 791 | static int __kprobes aggr_break_handler(struct kprobe *p, struct pt_regs *regs) |
792 | { | 792 | { |
793 | struct kprobe *cur = __get_cpu_var(kprobe_instance); | 793 | struct kprobe *cur = __this_cpu_read(kprobe_instance); |
794 | int ret = 0; | 794 | int ret = 0; |
795 | 795 | ||
796 | if (cur && cur->break_handler) { | 796 | if (cur && cur->break_handler) { |