diff options
Diffstat (limited to 'drivers/connector')
-rw-r--r-- | drivers/connector/cn_proc.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/connector/cn_proc.c b/drivers/connector/cn_proc.c index 385e52930c02..4b4d7db1ff7b 100644 --- a/drivers/connector/cn_proc.c +++ b/drivers/connector/cn_proc.c | |||
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/ktime.h> | ||
27 | #include <linux/init.h> | 28 | #include <linux/init.h> |
28 | #include <asm/atomic.h> | 29 | #include <asm/atomic.h> |
29 | 30 | ||
@@ -56,7 +57,7 @@ void proc_fork_connector(struct task_struct *task) | |||
56 | msg = (struct cn_msg*)buffer; | 57 | msg = (struct cn_msg*)buffer; |
57 | ev = (struct proc_event*)msg->data; | 58 | ev = (struct proc_event*)msg->data; |
58 | get_seq(&msg->seq, &ev->cpu); | 59 | get_seq(&msg->seq, &ev->cpu); |
59 | getnstimestamp(&ev->timestamp); | 60 | ktime_get_ts(&ev->timestamp); /* get high res monotonic timestamp */ |
60 | ev->what = PROC_EVENT_FORK; | 61 | ev->what = PROC_EVENT_FORK; |
61 | ev->event_data.fork.parent_pid = task->real_parent->pid; | 62 | ev->event_data.fork.parent_pid = task->real_parent->pid; |
62 | ev->event_data.fork.parent_tgid = task->real_parent->tgid; | 63 | ev->event_data.fork.parent_tgid = task->real_parent->tgid; |
@@ -82,7 +83,7 @@ void proc_exec_connector(struct task_struct *task) | |||
82 | msg = (struct cn_msg*)buffer; | 83 | msg = (struct cn_msg*)buffer; |
83 | ev = (struct proc_event*)msg->data; | 84 | ev = (struct proc_event*)msg->data; |
84 | get_seq(&msg->seq, &ev->cpu); | 85 | get_seq(&msg->seq, &ev->cpu); |
85 | getnstimestamp(&ev->timestamp); | 86 | ktime_get_ts(&ev->timestamp); |
86 | ev->what = PROC_EVENT_EXEC; | 87 | ev->what = PROC_EVENT_EXEC; |
87 | ev->event_data.exec.process_pid = task->pid; | 88 | ev->event_data.exec.process_pid = task->pid; |
88 | ev->event_data.exec.process_tgid = task->tgid; | 89 | ev->event_data.exec.process_tgid = task->tgid; |
@@ -116,7 +117,7 @@ void proc_id_connector(struct task_struct *task, int which_id) | |||
116 | } else | 117 | } else |
117 | return; | 118 | return; |
118 | get_seq(&msg->seq, &ev->cpu); | 119 | get_seq(&msg->seq, &ev->cpu); |
119 | getnstimestamp(&ev->timestamp); | 120 | ktime_get_ts(&ev->timestamp); |
120 | 121 | ||
121 | memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id)); | 122 | memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id)); |
122 | msg->ack = 0; /* not used */ | 123 | msg->ack = 0; /* not used */ |
@@ -136,7 +137,7 @@ void proc_exit_connector(struct task_struct *task) | |||
136 | msg = (struct cn_msg*)buffer; | 137 | msg = (struct cn_msg*)buffer; |
137 | ev = (struct proc_event*)msg->data; | 138 | ev = (struct proc_event*)msg->data; |
138 | get_seq(&msg->seq, &ev->cpu); | 139 | get_seq(&msg->seq, &ev->cpu); |
139 | getnstimestamp(&ev->timestamp); | 140 | ktime_get_ts(&ev->timestamp); |
140 | ev->what = PROC_EVENT_EXIT; | 141 | ev->what = PROC_EVENT_EXIT; |
141 | ev->event_data.exit.process_pid = task->pid; | 142 | ev->event_data.exit.process_pid = task->pid; |
142 | ev->event_data.exit.process_tgid = task->tgid; | 143 | ev->event_data.exit.process_tgid = task->tgid; |
@@ -169,7 +170,7 @@ static void cn_proc_ack(int err, int rcvd_seq, int rcvd_ack) | |||
169 | msg = (struct cn_msg*)buffer; | 170 | msg = (struct cn_msg*)buffer; |
170 | ev = (struct proc_event*)msg->data; | 171 | ev = (struct proc_event*)msg->data; |
171 | msg->seq = rcvd_seq; | 172 | msg->seq = rcvd_seq; |
172 | getnstimestamp(&ev->timestamp); | 173 | ktime_get_ts(&ev->timestamp); |
173 | ev->cpu = -1; | 174 | ev->cpu = -1; |
174 | ev->what = PROC_EVENT_NONE; | 175 | ev->what = PROC_EVENT_NONE; |
175 | ev->event_data.ack.err = err; | 176 | ev->event_data.ack.err = err; |