diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-12 19:25:35 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-12 19:25:35 -0500 |
commit | 9219a3b9889dbc7dae68e472f239672ff48860b0 (patch) | |
tree | c6446d63dd7ffb0f118804e354eee3d80041717e /arch/mips/kernel/branch.c | |
parent | 23ead7291269db3be71b442324381c8d63e5d0b3 (diff) | |
parent | cde15b5927fea3e1b4de0b277008cf273d8b000b (diff) |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (37 commits)
MIPS: Only write c0_framemask on CPUs which have this register.
MIPS: Alchemy: new userspace suspend interface for development boards.
MIPS: Alchemy: dbdma suspend/resume support.
MIPS: Alchemy: Fix up PM code on Au1550/Au1200
MIPS: Alchemy: move calc_clock function.
MIPS: Alchemy: RTC counter clocksource / clockevent support.
MIPS: make cp0 counter clocksource/event usable as fallback.
MIPS: Alchemy: remove cpu_table.
MIPS: Alchemy: remove get/set_au1x00_lcd_clock().
MIPS: Print irq handler description
MIPS: Alchemy: pb1200: update CPLD cascade irq handler.
MIPS: Alchemy: update core interrupt code.
MIPS: Alchemy: move commandline mangling out of common code
MIPS: Alchemy: devboards: consolidate files
MIPS: Alchemy: Move development board code to common subdirectory
MIPS: Add Cavium OCTEON to arch/mips/Kconfig
MIPS: Add defconfig for Cavium OCTEON.
MIPS: Adjust the dma-common.c platform hooks.
MIPS: Add Cavium OCTEON slot into proper tlb category.
MIPS: Compute branch returns for Cavium OCTEON specific branch instructions.
...
Diffstat (limited to 'arch/mips/kernel/branch.c')
-rw-r--r-- | arch/mips/kernel/branch.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/mips/kernel/branch.c b/arch/mips/kernel/branch.c index 6b5df8bfab85..0176ed015c89 100644 --- a/arch/mips/kernel/branch.c +++ b/arch/mips/kernel/branch.c | |||
@@ -205,6 +205,39 @@ int __compute_return_epc(struct pt_regs *regs) | |||
205 | break; | 205 | break; |
206 | } | 206 | } |
207 | break; | 207 | break; |
208 | #ifdef CONFIG_CPU_CAVIUM_OCTEON | ||
209 | case lwc2_op: /* This is bbit0 on Octeon */ | ||
210 | if ((regs->regs[insn.i_format.rs] & (1ull<<insn.i_format.rt)) | ||
211 | == 0) | ||
212 | epc = epc + 4 + (insn.i_format.simmediate << 2); | ||
213 | else | ||
214 | epc += 8; | ||
215 | regs->cp0_epc = epc; | ||
216 | break; | ||
217 | case ldc2_op: /* This is bbit032 on Octeon */ | ||
218 | if ((regs->regs[insn.i_format.rs] & | ||
219 | (1ull<<(insn.i_format.rt+32))) == 0) | ||
220 | epc = epc + 4 + (insn.i_format.simmediate << 2); | ||
221 | else | ||
222 | epc += 8; | ||
223 | regs->cp0_epc = epc; | ||
224 | break; | ||
225 | case swc2_op: /* This is bbit1 on Octeon */ | ||
226 | if (regs->regs[insn.i_format.rs] & (1ull<<insn.i_format.rt)) | ||
227 | epc = epc + 4 + (insn.i_format.simmediate << 2); | ||
228 | else | ||
229 | epc += 8; | ||
230 | regs->cp0_epc = epc; | ||
231 | break; | ||
232 | case sdc2_op: /* This is bbit132 on Octeon */ | ||
233 | if (regs->regs[insn.i_format.rs] & | ||
234 | (1ull<<(insn.i_format.rt+32))) | ||
235 | epc = epc + 4 + (insn.i_format.simmediate << 2); | ||
236 | else | ||
237 | epc += 8; | ||
238 | regs->cp0_epc = epc; | ||
239 | break; | ||
240 | #endif | ||
208 | } | 241 | } |
209 | 242 | ||
210 | return 0; | 243 | return 0; |