]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/oprofile: Fix error in oprofile power7_marked_instr_event() function
authorCarl E. Love <cel@linux.vnet.ibm.com>
Thu, 29 Nov 2012 06:42:03 +0000 (06:42 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 28 Jan 2013 23:18:14 +0000 (10:18 +1100)
commit1e4832aa7cfcd8abf1a9a7f3c0614e5e6e1ccf75
treef0b0f73d2bb546d82f15d8ae98115932f70fc8f9
parentb9c5f1aca7e60b80df4dc9877b01b679611c0939
powerpc/oprofile: Fix error in oprofile power7_marked_instr_event() function

The calculation for the left shift of the mask OPROFILE_PM_PMCSEL_MSK has an
error.  The calculation is should be to shift left by (max_cntrs - cntr) times
the width of the pmsel field width.  However, the #define OPROFILE_MAX_PMC_NUM
was used instead of OPROFILE_PMSEL_FIELD_WIDTH.  This patch fixes the
calculation.

Signed-off-by: Carl Love <cel@us.ibm.com>
Acked-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/oprofile/op_model_power4.c