mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
kprobes: Use this_cpu_ops
Use this_cpu ops in various places to optimize per cpu data access. Cc: Jason Baron <[email protected]> Cc: Namhyung Kim <[email protected]> Acked-by: H. Peter Anvin <[email protected]> Signed-off-by: Christoph Lameter <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
This commit is contained in:
parent
4a6f4fe837
commit
b76834bc1b
3 changed files with 13 additions and 13 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue