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.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.c')
-rw-r--r-- | kernel/trace/trace.c | 46 |
1 files changed, 2 insertions, 44 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 7e6cb4fe62f2..d372bc535963 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -785,7 +785,7 @@ trace_next_page(struct trace_array_cpu *data, void *addr) | |||
785 | return page_address(page); | 785 | return page_address(page); |
786 | } | 786 | } |
787 | 787 | ||
788 | static inline struct trace_entry * | 788 | struct trace_entry * |
789 | tracing_get_trace_entry(struct trace_array *tr, struct trace_array_cpu *data) | 789 | tracing_get_trace_entry(struct trace_array *tr, struct trace_array_cpu *data) |
790 | { | 790 | { |
791 | unsigned long idx, idx_next; | 791 | unsigned long idx, idx_next; |
@@ -821,7 +821,7 @@ tracing_get_trace_entry(struct trace_array *tr, struct trace_array_cpu *data) | |||
821 | return entry; | 821 | return entry; |
822 | } | 822 | } |
823 | 823 | ||
824 | static inline void | 824 | void |
825 | tracing_generic_entry_update(struct trace_entry *entry, unsigned long flags) | 825 | tracing_generic_entry_update(struct trace_entry *entry, unsigned long flags) |
826 | { | 826 | { |
827 | struct task_struct *tsk = current; | 827 | struct task_struct *tsk = current; |
@@ -865,48 +865,6 @@ ftrace(struct trace_array *tr, struct trace_array_cpu *data, | |||
865 | trace_function(tr, data, ip, parent_ip, flags); | 865 | trace_function(tr, data, ip, parent_ip, flags); |
866 | } | 866 | } |
867 | 867 | ||
868 | #ifdef CONFIG_MMIOTRACE | ||
869 | void __trace_mmiotrace_rw(struct trace_array *tr, struct trace_array_cpu *data, | ||
870 | struct mmiotrace_rw *rw) | ||
871 | { | ||
872 | struct trace_entry *entry; | ||
873 | unsigned long irq_flags; | ||
874 | |||
875 | raw_local_irq_save(irq_flags); | ||
876 | __raw_spin_lock(&data->lock); | ||
877 | |||
878 | entry = tracing_get_trace_entry(tr, data); | ||
879 | tracing_generic_entry_update(entry, 0); | ||
880 | entry->type = TRACE_MMIO_RW; | ||
881 | entry->field.mmiorw = *rw; | ||
882 | |||
883 | __raw_spin_unlock(&data->lock); | ||
884 | raw_local_irq_restore(irq_flags); | ||
885 | |||
886 | trace_wake_up(); | ||
887 | } | ||
888 | |||
889 | void __trace_mmiotrace_map(struct trace_array *tr, struct trace_array_cpu *data, | ||
890 | struct mmiotrace_map *map) | ||
891 | { | ||
892 | struct trace_entry *entry; | ||
893 | unsigned long irq_flags; | ||
894 | |||
895 | raw_local_irq_save(irq_flags); | ||
896 | __raw_spin_lock(&data->lock); | ||
897 | |||
898 | entry = tracing_get_trace_entry(tr, data); | ||
899 | tracing_generic_entry_update(entry, 0); | ||
900 | entry->type = TRACE_MMIO_MAP; | ||
901 | entry->field.mmiomap = *map; | ||
902 | |||
903 | __raw_spin_unlock(&data->lock); | ||
904 | raw_local_irq_restore(irq_flags); | ||
905 | |||
906 | trace_wake_up(); | ||
907 | } | ||
908 | #endif | ||
909 | |||
910 | void __trace_stack(struct trace_array *tr, | 868 | void __trace_stack(struct trace_array *tr, |
911 | struct trace_array_cpu *data, | 869 | struct trace_array_cpu *data, |
912 | unsigned long flags, | 870 | unsigned long flags, |