aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
authorRusty Lynch <rusty.lynch@intel.com>2005-06-23 03:09:31 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-23 12:45:23 -0400
commit13608d6433eb34840224ef632cc444f3eb59bc13 (patch)
tree249c668170713eac16abe94877ff71628e04b360 /arch/ia64
parent8bc76772ad653bcaad1b0af72aafb6072ef0fa87 (diff)
[PATCH] Kprobes ia64 qp fix
Fix a bug where a kprobe still fires when the instruction is predicated off. So given the p6=0, and we have an instruction like: (p6) move loc1=0 we should not be triggering the kprobe. This is handled by carrying over the qp section of the original instruction into the break instruction. Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> Signed-off-by: Rusty Lynch <Rusty.lynch@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/kernel/kprobes.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c
index b7a204137fbb..98bef04d9484 100644
--- a/arch/ia64/kernel/kprobes.c
+++ b/arch/ia64/kernel/kprobes.c
@@ -115,19 +115,19 @@ int arch_prepare_kprobe(struct kprobe *p)
115 case 0: 115 case 0:
116 major_opcode = (bundle->quad0.slot0 >> SLOT0_OPCODE_SHIFT); 116 major_opcode = (bundle->quad0.slot0 >> SLOT0_OPCODE_SHIFT);
117 kprobe_inst = bundle->quad0.slot0; 117 kprobe_inst = bundle->quad0.slot0;
118 bundle->quad0.slot0 = BREAK_INST; 118 bundle->quad0.slot0 = BREAK_INST | (0x3f & kprobe_inst);
119 break; 119 break;
120 case 1: 120 case 1:
121 major_opcode = (bundle->quad1.slot1_p1 >> SLOT1_p1_OPCODE_SHIFT); 121 major_opcode = (bundle->quad1.slot1_p1 >> SLOT1_p1_OPCODE_SHIFT);
122 kprobe_inst = (bundle->quad0.slot1_p0 | 122 kprobe_inst = (bundle->quad0.slot1_p0 |
123 (bundle->quad1.slot1_p1 << (64-46))); 123 (bundle->quad1.slot1_p1 << (64-46)));
124 bundle->quad0.slot1_p0 = BREAK_INST; 124 bundle->quad0.slot1_p0 = BREAK_INST | (0x3f & kprobe_inst);
125 bundle->quad1.slot1_p1 = (BREAK_INST >> (64-46)); 125 bundle->quad1.slot1_p1 = (BREAK_INST >> (64-46));
126 break; 126 break;
127 case 2: 127 case 2:
128 major_opcode = (bundle->quad1.slot2 >> SLOT2_OPCODE_SHIFT); 128 major_opcode = (bundle->quad1.slot2 >> SLOT2_OPCODE_SHIFT);
129 kprobe_inst = bundle->quad1.slot2; 129 kprobe_inst = bundle->quad1.slot2;
130 bundle->quad1.slot2 = BREAK_INST; 130 bundle->quad1.slot2 = BREAK_INST | (0x3f & kprobe_inst);
131 break; 131 break;
132 } 132 }
133 133