Re: [PATCH 3/4] perf_counter: frequency based adaptive irq_period

From: Ingo Molnar
Date: Fri May 15 2009 - 09:36:21 EST



* Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> wrote:

> @@ -2907,6 +2940,12 @@ perf_counter_alloc(struct perf_counter_h
>
> pmu = NULL;
>
> + hwc = &counter->hw;
> + if (hw_event->freq && hw_event->irq_freq)
> + hwc->irq_period = TICK_NSEC / hw_event->irq_freq;

this needs to use a 64-bit do_div method too, otherwise we get this
on 32-bit:

kernel/built-in.o: In function `perf_counter_alloc':
perf_counter.c:(.text+0x7ddc7): undefined reference to `__udivdi3'

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/