]> git.baikalelectronics.ru Git - kernel.git/commit
perf_counter: call atomic64_set for counter->count
authorPaul Mackerras <paulus@samba.org>
Mon, 11 May 2009 05:50:21 +0000 (15:50 +1000)
committerIngo Molnar <mingo@elte.hu>
Mon, 11 May 2009 10:10:54 +0000 (12:10 +0200)
commitbcc360fc56d1517e378c395c88f0f8bc24d383ff
treebc109da69e48f00fad8782ef1852d052e92d1546
parent2c2d474af3c14bcdc7e6a96fb783fdf6dbb0b1ca
perf_counter: call atomic64_set for counter->count

A compile warning triggered because we are calling
atomic_set(&counter->count). But since counter->count
is an atomic64_t, we have to use atomic64_set.

So the count can be set short, resulting in the reset ioctl
only resetting the low word.

[ Impact: clear counter properly during the reset ioctl ]

Signed-off-by: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
LKML-Reference: <18951.48285.270311.981806@drongo.ozlabs.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/perf_counter.c