diff options
Diffstat (limited to 'kernel/trace/trace_power.c')
-rw-r--r-- | kernel/trace/trace_power.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/kernel/trace/trace_power.c b/kernel/trace/trace_power.c index 3b1a292d12d2..bfc21f8079ab 100644 --- a/kernel/trace/trace_power.c +++ b/kernel/trace/trace_power.c | |||
@@ -124,17 +124,13 @@ void trace_power_end(struct power_trace *it) | |||
124 | it->end = ktime_get(); | 124 | it->end = ktime_get(); |
125 | data = tr->data[smp_processor_id()]; | 125 | data = tr->data[smp_processor_id()]; |
126 | 126 | ||
127 | event = ring_buffer_lock_reserve(tr->buffer, sizeof(*entry)); | 127 | event = trace_buffer_lock_reserve(tr, TRACE_POWER, |
128 | sizeof(*entry), 0, 0); | ||
128 | if (!event) | 129 | if (!event) |
129 | goto out; | 130 | goto out; |
130 | entry = ring_buffer_event_data(event); | 131 | entry = ring_buffer_event_data(event); |
131 | tracing_generic_entry_update(&entry->ent, 0, 0); | ||
132 | entry->ent.type = TRACE_POWER; | ||
133 | entry->state_data = *it; | 132 | entry->state_data = *it; |
134 | ring_buffer_unlock_commit(tr->buffer, event); | 133 | trace_buffer_unlock_commit(tr, event, 0, 0); |
135 | |||
136 | trace_wake_up(); | ||
137 | |||
138 | out: | 134 | out: |
139 | preempt_enable(); | 135 | preempt_enable(); |
140 | } | 136 | } |
@@ -159,17 +155,13 @@ void trace_power_mark(struct power_trace *it, unsigned int type, | |||
159 | it->end = it->stamp; | 155 | it->end = it->stamp; |
160 | data = tr->data[smp_processor_id()]; | 156 | data = tr->data[smp_processor_id()]; |
161 | 157 | ||
162 | event = ring_buffer_lock_reserve(tr->buffer, sizeof(*entry)); | 158 | event = trace_buffer_lock_reserve(tr, TRACE_POWER, |
159 | sizeof(*entry), 0, 0); | ||
163 | if (!event) | 160 | if (!event) |
164 | goto out; | 161 | goto out; |
165 | entry = ring_buffer_event_data(event); | 162 | entry = ring_buffer_event_data(event); |
166 | tracing_generic_entry_update(&entry->ent, 0, 0); | ||
167 | entry->ent.type = TRACE_POWER; | ||
168 | entry->state_data = *it; | 163 | entry->state_data = *it; |
169 | ring_buffer_unlock_commit(tr->buffer, event); | 164 | trace_buffer_unlock_commit(tr, event, 0, 0); |
170 | |||
171 | trace_wake_up(); | ||
172 | |||
173 | out: | 165 | out: |
174 | preempt_enable(); | 166 | preempt_enable(); |
175 | } | 167 | } |