diff options
author | Vyacheslav Cherkashin <v.cherkashin@samsung.com> | 2013-10-08 13:16:28 +0400 |
---|---|---|
committer | Vyacheslav Cherkashin <v.cherkashin@samsung.com> | 2013-10-08 13:16:28 +0400 |
commit | ee90add7734bd11288c550cdb99fea3e20f3e30b (patch) | |
tree | e0c99eb335150fa53cf15255d2b76bf2f556d63f /writer | |
parent | a11f828df3f3ab4a0f9d14b49c54c31e9e7b24f1 (diff) | |
download | swap-modules-ee90add7734bd11288c550cdb99fea3e20f3e30b.tar.gz swap-modules-ee90add7734bd11288c550cdb99fea3e20f3e30b.tar.bz2 swap-modules-ee90add7734bd11288c550cdb99fea3e20f3e30b.zip |
[REFACTOR] use smp_processor_id() instead of task_cpu()
Change-Id: Ife34a588e055f274e67e8a1e83a03b3f46a5c8f0
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
Diffstat (limited to 'writer')
-rw-r--r-- | writer/swap_writer_module.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/writer/swap_writer_module.c b/writer/swap_writer_module.c index b710d2f9..d2dcd184 100644 --- a/writer/swap_writer_module.c +++ b/writer/swap_writer_module.c @@ -99,7 +99,7 @@ EXPORT_SYMBOL_GPL(get_discarded_count); static char *get_current_buf(void) { - return cpu_buf[task_cpu(current)]; + return cpu_buf[smp_processor_id()]; } static inline u64 timespec2time(struct timespec *ts) @@ -349,7 +349,7 @@ static char *pack_sample(char *payload, struct pt_regs *regs) s->pid = task->tgid; s->pc_addr = get_regs_ip(regs); s->tid = task->pid; - s->cpu_num = task_cpu(current); + s->cpu_num = smp_processor_id(); return payload + sizeof(*s); } @@ -399,7 +399,7 @@ static char *pack_msg_func_entry(char *payload, const char *fmt, struct pt_regs mfe->pid = task->tgid; mfe->tid = task->pid; - mfe->cpu_num = task_cpu(task); + mfe->cpu_num = smp_processor_id(); mfe->pc_addr = get_regs_ip(regs); //TODO ret address for x86! mfe->caller_pc_addr = get_regs_ret_func(regs); @@ -556,7 +556,7 @@ static char *pack_msg_func_exit(char *payload, struct pt_regs *regs, mfe->pid = task->tgid; mfe->tid = task->pid; - mfe->cpu_num = task_cpu(task); + mfe->cpu_num = smp_processor_id(); mfe->pc_addr = func_addr; mfe->caller_pc_addr = ret_addr; mfe->ret_val = get_regs_ret_val(regs); @@ -605,7 +605,7 @@ static char *pack_msg_context_switch(char *payload, struct pt_regs *regs) mcs->pc_addr = 0; mcs->pid = task->tgid; mcs->tid = task->pid; - mcs->cpu_num = task_cpu(task); + mcs->cpu_num = smp_processor_id(); return payload + sizeof(*mcs); } |