diff options
author | Pekka Paalanen <pq@iki.fi> | 2008-09-16 14:56:41 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-14 04:37:04 -0400 |
commit | 45dcd8b8a8ca855591e3ac882d3a7fc255d09d43 (patch) | |
tree | 55b1772dfc9a6381ab1ecad7f3f6fbd605427f20 /kernel/trace/trace_mmiotrace.c | |
parent | bbe5c7830c6dbde58726d44ec0337bc8b2d95d37 (diff) |
ftrace: move mmiotrace functions out of trace.c
Moves the mmiotrace specific functions from trace.c to
trace_mmiotrace.c. Functions trace_wake_up(), tracing_get_trace_entry(),
and tracing_generic_entry_update() are therefore made available outside
trace.c.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace_mmiotrace.c')
-rw-r--r-- | kernel/trace/trace_mmiotrace.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/kernel/trace/trace_mmiotrace.c b/kernel/trace/trace_mmiotrace.c index 9b7a936f4b1f..ef02747b26d9 100644 --- a/kernel/trace/trace_mmiotrace.c +++ b/kernel/trace/trace_mmiotrace.c | |||
@@ -276,6 +276,27 @@ __init static int init_mmio_trace(void) | |||
276 | } | 276 | } |
277 | device_initcall(init_mmio_trace); | 277 | device_initcall(init_mmio_trace); |
278 | 278 | ||
279 | static void __trace_mmiotrace_rw(struct trace_array *tr, | ||
280 | struct trace_array_cpu *data, | ||
281 | struct mmiotrace_rw *rw) | ||
282 | { | ||
283 | struct trace_entry *entry; | ||
284 | unsigned long irq_flags; | ||
285 | |||
286 | raw_local_irq_save(irq_flags); | ||
287 | __raw_spin_lock(&data->lock); | ||
288 | |||
289 | entry = tracing_get_trace_entry(tr, data); | ||
290 | tracing_generic_entry_update(entry, 0); | ||
291 | entry->type = TRACE_MMIO_RW; | ||
292 | entry->field.mmiorw = *rw; | ||
293 | |||
294 | __raw_spin_unlock(&data->lock); | ||
295 | raw_local_irq_restore(irq_flags); | ||
296 | |||
297 | trace_wake_up(); | ||
298 | } | ||
299 | |||
279 | void mmio_trace_rw(struct mmiotrace_rw *rw) | 300 | void mmio_trace_rw(struct mmiotrace_rw *rw) |
280 | { | 301 | { |
281 | struct trace_array *tr = mmio_trace_array; | 302 | struct trace_array *tr = mmio_trace_array; |
@@ -283,6 +304,27 @@ void mmio_trace_rw(struct mmiotrace_rw *rw) | |||
283 | __trace_mmiotrace_rw(tr, data, rw); | 304 | __trace_mmiotrace_rw(tr, data, rw); |
284 | } | 305 | } |
285 | 306 | ||
307 | static void __trace_mmiotrace_map(struct trace_array *tr, | ||
308 | struct trace_array_cpu *data, | ||
309 | struct mmiotrace_map *map) | ||
310 | { | ||
311 | struct trace_entry *entry; | ||
312 | unsigned long irq_flags; | ||
313 | |||
314 | raw_local_irq_save(irq_flags); | ||
315 | __raw_spin_lock(&data->lock); | ||
316 | |||
317 | entry = tracing_get_trace_entry(tr, data); | ||
318 | tracing_generic_entry_update(entry, 0); | ||
319 | entry->type = TRACE_MMIO_MAP; | ||
320 | entry->field.mmiomap = *map; | ||
321 | |||
322 | __raw_spin_unlock(&data->lock); | ||
323 | raw_local_irq_restore(irq_flags); | ||
324 | |||
325 | trace_wake_up(); | ||
326 | } | ||
327 | |||
286 | void mmio_trace_mapping(struct mmiotrace_map *map) | 328 | void mmio_trace_mapping(struct mmiotrace_map *map) |
287 | { | 329 | { |
288 | struct trace_array *tr = mmio_trace_array; | 330 | struct trace_array *tr = mmio_trace_array; |