x86: Rename trap_no to trap_nr in thread_struct
There are precedences of trap number being referred to as trap_nr. However thread struct refers trap number as trap_no. Change it to trap_nr. Also use enum instead of left-over literals for trap values. This is pure cleanup, no functional change intended. Suggested-by: Ingo Molnar <mingo@eltu.hu> Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Cc: Jim Keniston <jkenisto@linux.vnet.ibm.com> Cc: Linux-mm <linux-mm@kvack.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: Christoph Hellwig <hch@infradead.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Arnaldo Carvalho de Melo <acme@infradead.org> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20120312092555.5379.942.sendpatchset@srdronam.in.ibm.com [ Fixed the math-emu build ] Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:

committed by
Ingo Molnar

parent
e898c67068
commit
51e7dc7011
@@ -28,6 +28,7 @@
|
||||
#include <linux/regset.h>
|
||||
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/traps.h>
|
||||
#include <asm/desc.h>
|
||||
#include <asm/user.h>
|
||||
#include <asm/i387.h>
|
||||
@@ -269,7 +270,7 @@ void math_emulate(struct math_emu_info *info)
|
||||
FPU_EIP = FPU_ORIG_EIP; /* Point to current FPU instruction. */
|
||||
|
||||
RE_ENTRANT_CHECK_OFF;
|
||||
current->thread.trap_no = 16;
|
||||
current->thread.trap_nr = X86_TRAP_MF;
|
||||
current->thread.error_code = 0;
|
||||
send_sig(SIGFPE, current, 1);
|
||||
return;
|
||||
@@ -662,7 +663,7 @@ static int valid_prefix(u_char *Byte, u_char __user **fpu_eip,
|
||||
void math_abort(struct math_emu_info *info, unsigned int signal)
|
||||
{
|
||||
FPU_EIP = FPU_ORIG_EIP;
|
||||
current->thread.trap_no = 16;
|
||||
current->thread.trap_nr = X86_TRAP_MF;
|
||||
current->thread.error_code = 0;
|
||||
send_sig(signal, current, 1);
|
||||
RE_ENTRANT_CHECK_OFF;
|
||||
|
Reference in New Issue
Block a user