diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-30 11:10:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-30 11:10:12 -0400 |
commit | 24a77daf3d80bddcece044e6dc3675e427eef3f3 (patch) | |
tree | 2c5e0b0bea394d6fe62c5d5857c252e83e48ac48 /arch/powerpc/lib/sstep.c | |
parent | e389f9aec689209724105ae80a6c91fd2e747bc9 (diff) | |
parent | f900e9777fc9b65140cb9570438597bc8fae56ab (diff) |
Merge branch 'for-2.6.22' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'for-2.6.22' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (255 commits)
[POWERPC] Remove dev_dbg redefinition in drivers/ps3/vuart.c
[POWERPC] remove kernel module option for booke wdt
[POWERPC] Avoid putting cpu node twice
[POWERPC] Spinlock initializer cleanup
[POWERPC] ppc4xx_sgdma needs dma-mapping.h
[POWERPC] arch/powerpc/sysdev/timer.c build fix
[POWERPC] get_property cleanups
[POWERPC] Remove the unused HTDMSOUND driver
[POWERPC] cell: cbe_cpufreq cleanup and crash fix
[POWERPC] Declare enable_kernel_spe in a header
[POWERPC] Add dt_xlate_addr() to bootwrapper
[POWERPC] bootwrapper: CONFIG_ -> CONFIG_DEVICE_TREE
[POWERPC] Don't define a custom bd_t for Xilixn Virtex based boards.
[POWERPC] Add sane defaults for Xilinx EDK generated xparameters files
[POWERPC] Add uartlite boot console driver for the zImage wrapper
[POWERPC] Stop using ppc_sys for Xilinx Virtex boards
[POWERPC] New registration for common Xilinx Virtex ppc405 platform devices
[POWERPC] Merge common virtex header files
[POWERPC] Rework Kconfig dependancies for Xilinx Virtex ppc405 platform
[POWERPC] Clean up cpufreq Kconfig dependencies
...
Diffstat (limited to 'arch/powerpc/lib/sstep.c')
-rw-r--r-- | arch/powerpc/lib/sstep.c | 45 |
1 files changed, 44 insertions, 1 deletions
diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c index 7e8ded051b5b..4aae0c387645 100644 --- a/arch/powerpc/lib/sstep.c +++ b/arch/powerpc/lib/sstep.c | |||
@@ -54,7 +54,7 @@ static int __kprobes branch_taken(unsigned int instr, struct pt_regs *regs) | |||
54 | */ | 54 | */ |
55 | int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr) | 55 | int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr) |
56 | { | 56 | { |
57 | unsigned int opcode, rd; | 57 | unsigned int opcode, rs, rb, rd, spr; |
58 | unsigned long int imm; | 58 | unsigned long int imm; |
59 | 59 | ||
60 | opcode = instr >> 26; | 60 | opcode = instr >> 26; |
@@ -152,6 +152,49 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr) | |||
152 | regs->nip &= 0xffffffffUL; | 152 | regs->nip &= 0xffffffffUL; |
153 | return 1; | 153 | return 1; |
154 | #endif | 154 | #endif |
155 | case 0x26: /* mfcr */ | ||
156 | regs->gpr[rd] = regs->ccr; | ||
157 | regs->gpr[rd] &= 0xffffffffUL; | ||
158 | goto mtspr_out; | ||
159 | case 0x2a6: /* mfspr */ | ||
160 | spr = (instr >> 11) & 0x3ff; | ||
161 | switch (spr) { | ||
162 | case 0x20: /* mfxer */ | ||
163 | regs->gpr[rd] = regs->xer; | ||
164 | regs->gpr[rd] &= 0xffffffffUL; | ||
165 | goto mtspr_out; | ||
166 | case 0x100: /* mflr */ | ||
167 | regs->gpr[rd] = regs->link; | ||
168 | goto mtspr_out; | ||
169 | case 0x120: /* mfctr */ | ||
170 | regs->gpr[rd] = regs->ctr; | ||
171 | goto mtspr_out; | ||
172 | } | ||
173 | break; | ||
174 | case 0x378: /* orx */ | ||
175 | rs = (instr >> 21) & 0x1f; | ||
176 | rb = (instr >> 11) & 0x1f; | ||
177 | if (rs == rb) { /* mr */ | ||
178 | rd = (instr >> 16) & 0x1f; | ||
179 | regs->gpr[rd] = regs->gpr[rs]; | ||
180 | goto mtspr_out; | ||
181 | } | ||
182 | break; | ||
183 | case 0x3a6: /* mtspr */ | ||
184 | spr = (instr >> 11) & 0x3ff; | ||
185 | switch (spr) { | ||
186 | case 0x20: /* mtxer */ | ||
187 | regs->xer = (regs->gpr[rd] & 0xffffffffUL); | ||
188 | goto mtspr_out; | ||
189 | case 0x100: /* mtlr */ | ||
190 | regs->link = regs->gpr[rd]; | ||
191 | goto mtspr_out; | ||
192 | case 0x120: /* mtctr */ | ||
193 | regs->ctr = regs->gpr[rd]; | ||
194 | mtspr_out: | ||
195 | regs->nip += 4; | ||
196 | return 1; | ||
197 | } | ||
155 | } | 198 | } |
156 | } | 199 | } |
157 | return 0; | 200 | return 0; |