summaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_power.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/trace_power.c')
-rw-r--r--kernel/trace/trace_power.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/kernel/trace/trace_power.c b/kernel/trace/trace_power.c
index faa6ab7..bfc21f8 100644
--- a/kernel/trace/trace_power.c
+++ b/kernel/trace/trace_power.c
@@ -115,7 +115,6 @@ void trace_power_end(struct power_trace *it)
struct ring_buffer_event *event;
struct trace_power *entry;
struct trace_array_cpu *data;
- unsigned long irq_flags;
struct trace_array *tr = power_trace;
if (!trace_power_enabled)
@@ -125,18 +124,13 @@ void trace_power_end(struct power_trace *it)
it->end = ktime_get();
data = tr->data[smp_processor_id()];
- event = ring_buffer_lock_reserve(tr->buffer, sizeof(*entry),
- &irq_flags);
+ event = trace_buffer_lock_reserve(tr, TRACE_POWER,
+ sizeof(*entry), 0, 0);
if (!event)
goto out;
entry = ring_buffer_event_data(event);
- tracing_generic_entry_update(&entry->ent, 0, 0);
- entry->ent.type = TRACE_POWER;
entry->state_data = *it;
- ring_buffer_unlock_commit(tr->buffer, event, irq_flags);
-
- trace_wake_up();
-
+ trace_buffer_unlock_commit(tr, event, 0, 0);
out:
preempt_enable();
}
@@ -148,7 +142,6 @@ void trace_power_mark(struct power_trace *it, unsigned int type,
struct ring_buffer_event *event;
struct trace_power *entry;
struct trace_array_cpu *data;
- unsigned long irq_flags;
struct trace_array *tr = power_trace;
if (!trace_power_enabled)
@@ -162,18 +155,13 @@ void trace_power_mark(struct power_trace *it, unsigned int type,
it->end = it->stamp;
data = tr->data[smp_processor_id()];
- event = ring_buffer_lock_reserve(tr->buffer, sizeof(*entry),
- &irq_flags);
+ event = trace_buffer_lock_reserve(tr, TRACE_POWER,
+ sizeof(*entry), 0, 0);
if (!event)
goto out;
entry = ring_buffer_event_data(event);
- tracing_generic_entry_update(&entry->ent, 0, 0);
- entry->ent.type = TRACE_POWER;
entry->state_data = *it;
- ring_buffer_unlock_commit(tr->buffer, event, irq_flags);
-
- trace_wake_up();
-
+ trace_buffer_unlock_commit(tr, event, 0, 0);
out:
preempt_enable();
}
OpenPOWER on IntegriCloud