aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/traps.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-12-09 01:14:38 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-12-09 01:14:38 -0500
commitbcd6acd51f3d4d1ada201e9bc5c40a31d6d80c71 (patch)
tree2f6dffd2d3e4dd67355a224de7e7a960335a92fd /arch/powerpc/kernel/traps.c
parent11c34c7deaeeebcee342cbc35e1bb2a6711b2431 (diff)
parent3ff6a468b45b5dfeb0e903e56f4eb27d34b2437c (diff)
Merge commit 'origin/master' into next
Conflicts: include/linux/kvm.h
Diffstat (limited to 'arch/powerpc/kernel/traps.c')
-rw-r--r--arch/powerpc/kernel/traps.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index a81c7438d341..804f0f30f227 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -737,7 +737,7 @@ static int emulate_instruction(struct pt_regs *regs)
737 737
738 /* Emulate the mfspr rD, PVR. */ 738 /* Emulate the mfspr rD, PVR. */
739 if ((instword & PPC_INST_MFSPR_PVR_MASK) == PPC_INST_MFSPR_PVR) { 739 if ((instword & PPC_INST_MFSPR_PVR_MASK) == PPC_INST_MFSPR_PVR) {
740 PPC_WARN_EMULATED(mfpvr); 740 PPC_WARN_EMULATED(mfpvr, regs);
741 rd = (instword >> 21) & 0x1f; 741 rd = (instword >> 21) & 0x1f;
742 regs->gpr[rd] = mfspr(SPRN_PVR); 742 regs->gpr[rd] = mfspr(SPRN_PVR);
743 return 0; 743 return 0;
@@ -745,7 +745,7 @@ static int emulate_instruction(struct pt_regs *regs)
745 745
746 /* Emulating the dcba insn is just a no-op. */ 746 /* Emulating the dcba insn is just a no-op. */
747 if ((instword & PPC_INST_DCBA_MASK) == PPC_INST_DCBA) { 747 if ((instword & PPC_INST_DCBA_MASK) == PPC_INST_DCBA) {
748 PPC_WARN_EMULATED(dcba); 748 PPC_WARN_EMULATED(dcba, regs);
749 return 0; 749 return 0;
750 } 750 }
751 751
@@ -754,7 +754,7 @@ static int emulate_instruction(struct pt_regs *regs)
754 int shift = (instword >> 21) & 0x1c; 754 int shift = (instword >> 21) & 0x1c;
755 unsigned long msk = 0xf0000000UL >> shift; 755 unsigned long msk = 0xf0000000UL >> shift;
756 756
757 PPC_WARN_EMULATED(mcrxr); 757 PPC_WARN_EMULATED(mcrxr, regs);
758 regs->ccr = (regs->ccr & ~msk) | ((regs->xer >> shift) & msk); 758 regs->ccr = (regs->ccr & ~msk) | ((regs->xer >> shift) & msk);
759 regs->xer &= ~0xf0000000UL; 759 regs->xer &= ~0xf0000000UL;
760 return 0; 760 return 0;
@@ -762,19 +762,19 @@ static int emulate_instruction(struct pt_regs *regs)
762 762
763 /* Emulate load/store string insn. */ 763 /* Emulate load/store string insn. */
764 if ((instword & PPC_INST_STRING_GEN_MASK) == PPC_INST_STRING) { 764 if ((instword & PPC_INST_STRING_GEN_MASK) == PPC_INST_STRING) {
765 PPC_WARN_EMULATED(string); 765 PPC_WARN_EMULATED(string, regs);
766 return emulate_string_inst(regs, instword); 766 return emulate_string_inst(regs, instword);
767 } 767 }
768 768
769 /* Emulate the popcntb (Population Count Bytes) instruction. */ 769 /* Emulate the popcntb (Population Count Bytes) instruction. */
770 if ((instword & PPC_INST_POPCNTB_MASK) == PPC_INST_POPCNTB) { 770 if ((instword & PPC_INST_POPCNTB_MASK) == PPC_INST_POPCNTB) {
771 PPC_WARN_EMULATED(popcntb); 771 PPC_WARN_EMULATED(popcntb, regs);
772 return emulate_popcntb_inst(regs, instword); 772 return emulate_popcntb_inst(regs, instword);
773 } 773 }
774 774
775 /* Emulate isel (Integer Select) instruction */ 775 /* Emulate isel (Integer Select) instruction */
776 if ((instword & PPC_INST_ISEL_MASK) == PPC_INST_ISEL) { 776 if ((instword & PPC_INST_ISEL_MASK) == PPC_INST_ISEL) {
777 PPC_WARN_EMULATED(isel); 777 PPC_WARN_EMULATED(isel, regs);
778 return emulate_isel(regs, instword); 778 return emulate_isel(regs, instword);
779 } 779 }
780 780
@@ -973,7 +973,7 @@ void SoftwareEmulation(struct pt_regs *regs)
973#ifdef CONFIG_MATH_EMULATION 973#ifdef CONFIG_MATH_EMULATION
974 errcode = do_mathemu(regs); 974 errcode = do_mathemu(regs);
975 if (errcode >= 0) 975 if (errcode >= 0)
976 PPC_WARN_EMULATED(math); 976 PPC_WARN_EMULATED(math, regs);
977 977
978 switch (errcode) { 978 switch (errcode) {
979 case 0: 979 case 0:
@@ -996,7 +996,7 @@ void SoftwareEmulation(struct pt_regs *regs)
996#elif defined(CONFIG_8XX_MINIMAL_FPEMU) 996#elif defined(CONFIG_8XX_MINIMAL_FPEMU)
997 errcode = Soft_emulate_8xx(regs); 997 errcode = Soft_emulate_8xx(regs);
998 if (errcode >= 0) 998 if (errcode >= 0)
999 PPC_WARN_EMULATED(8xx); 999 PPC_WARN_EMULATED(8xx, regs);
1000 1000
1001 switch (errcode) { 1001 switch (errcode) {
1002 case 0: 1002 case 0:
@@ -1107,7 +1107,7 @@ void altivec_assist_exception(struct pt_regs *regs)
1107 1107
1108 flush_altivec_to_thread(current); 1108 flush_altivec_to_thread(current);
1109 1109
1110 PPC_WARN_EMULATED(altivec); 1110 PPC_WARN_EMULATED(altivec, regs);
1111 err = emulate_altivec(regs); 1111 err = emulate_altivec(regs);
1112 if (err == 0) { 1112 if (err == 0) {
1113 regs->nip += 4; /* skip emulated instruction */ 1113 regs->nip += 4; /* skip emulated instruction */