提交 9f5f9ffe 编写于 作者: P Paul Mackerras 提交者: Benjamin Herrenschmidt

powerpc/perf: Fix sampling enable for PPC970

The logic to distinguish marked instruction events from ordinary events
on PPC970 and derivatives was flawed.  The result is that instruction
sampling didn't get enabled in the PMU for some marked instruction
events, so they would never trigger.  This fixes it by adding the
appropriate break statements in the switch statement.
Reported-by: NDavid Binderman <dcb314@hotmail.com>
Cc: stable@kernel.org
Signed-off-by: NPaul Mackerras <paulus@samba.org>
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 1ef21199
...@@ -169,9 +169,11 @@ static int p970_marked_instr_event(u64 event) ...@@ -169,9 +169,11 @@ static int p970_marked_instr_event(u64 event)
switch (unit) { switch (unit) {
case PM_VPU: case PM_VPU:
mask = 0x4c; /* byte 0 bits 2,3,6 */ mask = 0x4c; /* byte 0 bits 2,3,6 */
break;
case PM_LSU0: case PM_LSU0:
/* byte 2 bits 0,2,3,4,6; all of byte 1 */ /* byte 2 bits 0,2,3,4,6; all of byte 1 */
mask = 0x085dff00; mask = 0x085dff00;
break;
case PM_LSU1L: case PM_LSU1L:
mask = 0x50 << 24; /* byte 3 bits 4,6 */ mask = 0x50 << 24; /* byte 3 bits 4,6 */
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册