[PATCH] Accurate task and cpu time accounting
Paul Mackerras
paulus at samba.org
Mon Feb 27 15:43:29 EST 2006
Olaf Hering writes:
> cpufreq has now unresolved symbols.
This should fix it... (now in powerpc.git)
Paul.
diff-tree 2cf82c0256b198ae28c465f2c4d7c12c836ea5ea (from f055affb89f587a03f3411c3fd49ef31295c3d48)
Author: Paul Mackerras <paulus at samba.org>
Date: Mon Feb 27 15:41:47 2006 +1100
powerpc: Export variables used in conversions to/from cputime_t
The inline cputime_to_foo and foo_to_cputime conversion functions in
include/asm-powerpc/cputime.h refer to 5 variables, which need to be
exported if those functions are to be usable from modules.
Signed-off-by: Paul Mackerras <paulus at samba.org>
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 0b34db2..4f20a5f 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -97,10 +97,11 @@ static unsigned long first_settimeofday
unsigned long tb_ticks_per_jiffy;
unsigned long tb_ticks_per_usec = 100; /* sane default */
EXPORT_SYMBOL(tb_ticks_per_usec);
unsigned long tb_ticks_per_sec;
+EXPORT_SYMBOL(tb_ticks_per_sec); /* for cputime_t conversions */
u64 tb_to_xs;
unsigned tb_to_us;
#define TICKLEN_SCALE (SHIFT_SCALE - 10)
u64 last_tick_len; /* units are ns / 2^TICKLEN_SCALE */
@@ -141,13 +142,17 @@ DEFINE_PER_CPU(unsigned long, last_jiffy
* Factors for converting from cputime_t (timebase ticks) to
* jiffies, milliseconds, seconds, and clock_t (1/USER_HZ seconds).
* These are all stored as 0.64 fixed-point binary fractions.
*/
u64 __cputime_jiffies_factor;
+EXPORT_SYMBOL(__cputime_jiffies_factor);
u64 __cputime_msec_factor;
+EXPORT_SYMBOL(__cputime_msec_factor);
u64 __cputime_sec_factor;
+EXPORT_SYMBOL(__cputime_sec_factor);
u64 __cputime_clockt_factor;
+EXPORT_SYMBOL(__cputime_clockt_factor);
static void calc_cputime_factors(void)
{
struct div_result res;
More information about the Linuxppc64-dev
mailing list