Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 44156
b: refs/heads/master
c: 6e7726e
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Dec 10, 2006
1 parent 205bbf5 commit b533ce7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 042cf50cfd0bc3e1769d8287465eb522e8a08ba6
refs/heads/master: 6e7726e16fb5e8f1169dbfcb75e321ac871af827
18 changes: 15 additions & 3 deletions trunk/arch/sparc64/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -2261,8 +2261,12 @@ void die_if_kernel(char *str, struct pt_regs *regs)
do_exit(SIGSEGV);
}

#define VIS_OPCODE_MASK ((0x3 << 30) | (0x3f << 19))
#define VIS_OPCODE_VAL ((0x2 << 30) | (0x36 << 19))

extern int handle_popc(u32 insn, struct pt_regs *regs);
extern int handle_ldf_stq(u32 insn, struct pt_regs *regs);
extern int vis_emul(struct pt_regs *, unsigned int);

void do_illegal_instruction(struct pt_regs *regs)
{
Expand All @@ -2287,10 +2291,18 @@ void do_illegal_instruction(struct pt_regs *regs)
if (handle_ldf_stq(insn, regs))
return;
} else if (tlb_type == hypervisor) {
extern int vis_emul(struct pt_regs *, unsigned int);
if ((insn & VIS_OPCODE_MASK) == VIS_OPCODE_VAL) {
if (!vis_emul(regs, insn))
return;
} else {
struct fpustate *f = FPUSTATE;

if (!vis_emul(regs, insn))
return;
/* XXX maybe verify XFSR bits like
* XXX do_fpother() does?
*/
if (do_mathemu(regs, f))
return;
}
}
}
info.si_signo = SIGILL;
Expand Down
6 changes: 0 additions & 6 deletions trunk/arch/sparc64/kernel/visemul.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,6 @@
/* 001001100 - Permute bytes as specified by GSR.MASK */
#define BSHUFFLE_OPF 0x04c

#define VIS_OPCODE_MASK ((0x3 << 30) | (0x3f << 19))
#define VIS_OPCODE_VAL ((0x2 << 30) | (0x36 << 19))

#define VIS_OPF_SHIFT 5
#define VIS_OPF_MASK (0x1ff << VIS_OPF_SHIFT)

Expand Down Expand Up @@ -810,9 +807,6 @@ int vis_emul(struct pt_regs *regs, unsigned int insn)
if (get_user(insn, (u32 __user *) pc))
return -EFAULT;

if ((insn & VIS_OPCODE_MASK) != VIS_OPCODE_VAL)
return -EINVAL;

opf = (insn & VIS_OPF_MASK) >> VIS_OPF_SHIFT;
switch (opf) {
default:
Expand Down

0 comments on commit b533ce7

Please sign in to comment.