aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/perf_counter.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-05-15 09:37:47 -0400
committerIngo Molnar <mingo@elte.hu>2009-05-15 09:40:25 -0400
commit2e569d36729c8105ae066a9b105068305442cc77 (patch)
treece18dba8c5635693cdeb4af3652ba77c4e98abde /kernel/perf_counter.c
parentf5456a6b056b709282e87a68b4c1b81ac2e866fa (diff)
perf_counter: frequency based adaptive irq_period, 32-bit fix
fix: kernel/built-in.o: In function `perf_counter_alloc': perf_counter.c:(.text+0x7ddc7): undefined reference to `__udivdi3' [ Impact: build fix on 32-bit systems ] Reported-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> LKML-Reference: <1242394667.6642.1887.camel@laptop> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/perf_counter.c')
-rw-r--r--kernel/perf_counter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c
index 0ad1db4f3d65..728a595399b0 100644
--- a/kernel/perf_counter.c
+++ b/kernel/perf_counter.c
@@ -2942,7 +2942,7 @@ perf_counter_alloc(struct perf_counter_hw_event *hw_event,
2942 2942
2943 hwc = &counter->hw; 2943 hwc = &counter->hw;
2944 if (hw_event->freq && hw_event->irq_freq) 2944 if (hw_event->freq && hw_event->irq_freq)
2945 hwc->irq_period = TICK_NSEC / hw_event->irq_freq; 2945 hwc->irq_period = div64_u64(TICK_NSEC, hw_event->irq_freq);
2946 else 2946 else
2947 hwc->irq_period = hw_event->irq_period; 2947 hwc->irq_period = hw_event->irq_period;
2948 2948