[patch 14/17] MIPS : export hpt frequency for trace_clock.

Mathieu Desnoyers
2008-11-12T23:35:16Z

[-- Attachment #1: mips-export-hpt-frequency-for-trace-clock.patch --]
[-- Type: text/plain, Size: 1393 bytes --]

Trace_clock needs to export the hpt frequency to modules (e.g. LTTng).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
CC: Ralf Baechle <ralf@linux-mips.org>
---
arch/mips/include/asm/timex.h | 2 ++
arch/mips/kernel/time.c | 1 +
2 files changed, 3 insertions(+)

Index: linux.trees.git/arch/mips/include/asm/timex.h
===================================================================
--- linux.trees.git.orig/arch/mips/include/asm/timex.h 2008-11-12 18:03:16.000000000 -0500
+++ linux.trees.git/arch/mips/include/asm/timex.h 2008-11-12 18:03:33.000000000 -0500
@@ -89,6 +89,8 @@ static inline void write_tsc(u32 val1, u
write_c0_compare(read_c0_count() + DELAY_INTERRUPT);
}

+extern unsigned int mips_hpt_frequency;
+
#endif /* __KERNEL__ */

#endif /* _ASM_TIMEX_H */
Index: linux.trees.git/arch/mips/kernel/time.c
===================================================================
--- linux.trees.git.orig/arch/mips/kernel/time.c 2008-11-07 00:34:10.000000000 -0500
+++ linux.trees.git/arch/mips/kernel/time.c 2008-11-12 18:03:33.000000000 -0500
@@ -70,6 +70,7 @@ EXPORT_SYMBOL(perf_irq);
*/

unsigned int mips_hpt_frequency;
+EXPORT_SYMBOL(mips_hpt_frequency);

void __init clocksource_set_clock(struct clocksource *cs, unsigned int clock)
{