aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_boot.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/trace_boot.c')
-rw-r--r--kernel/trace/trace_boot.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/kernel/trace/trace_boot.c b/kernel/trace/trace_boot.c
index 4e08debf662d..7a30fc4c3642 100644
--- a/kernel/trace/trace_boot.c
+++ b/kernel/trace/trace_boot.c
@@ -143,17 +143,13 @@ void trace_boot_call(struct boot_trace_call *bt, initcall_t fn)
143 sprint_symbol(bt->func, (unsigned long)fn); 143 sprint_symbol(bt->func, (unsigned long)fn);
144 preempt_disable(); 144 preempt_disable();
145 145
146 event = ring_buffer_lock_reserve(tr->buffer, sizeof(*entry)); 146 event = trace_buffer_lock_reserve(tr, TRACE_BOOT_CALL,
147 sizeof(*entry), 0, 0);
147 if (!event) 148 if (!event)
148 goto out; 149 goto out;
149 entry = ring_buffer_event_data(event); 150 entry = ring_buffer_event_data(event);
150 tracing_generic_entry_update(&entry->ent, 0, 0);
151 entry->ent.type = TRACE_BOOT_CALL;
152 entry->boot_call = *bt; 151 entry->boot_call = *bt;
153 ring_buffer_unlock_commit(tr->buffer, event); 152 trace_buffer_unlock_commit(tr, event, 0, 0);
154
155 trace_wake_up();
156
157 out: 153 out:
158 preempt_enable(); 154 preempt_enable();
159} 155}
@@ -170,17 +166,13 @@ void trace_boot_ret(struct boot_trace_ret *bt, initcall_t fn)
170 sprint_symbol(bt->func, (unsigned long)fn); 166 sprint_symbol(bt->func, (unsigned long)fn);
171 preempt_disable(); 167 preempt_disable();
172 168
173 event = ring_buffer_lock_reserve(tr->buffer, sizeof(*entry)); 169 event = trace_buffer_lock_reserve(tr, TRACE_BOOT_RET,
170 sizeof(*entry), 0, 0);
174 if (!event) 171 if (!event)
175 goto out; 172 goto out;
176 entry = ring_buffer_event_data(event); 173 entry = ring_buffer_event_data(event);
177 tracing_generic_entry_update(&entry->ent, 0, 0);
178 entry->ent.type = TRACE_BOOT_RET;
179 entry->boot_ret = *bt; 174 entry->boot_ret = *bt;
180 ring_buffer_unlock_commit(tr->buffer, event); 175 trace_buffer_unlock_commit(tr, event, 0, 0);
181
182 trace_wake_up();
183
184 out: 176 out:
185 preempt_enable(); 177 preempt_enable();
186} 178}