diff options
author | Srikar Dronamraju <srikar@linux.vnet.ibm.com> | 2012-03-12 05:25:55 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2012-03-13 01:24:09 -0400 |
commit | 51e7dc7011c99e1e5294658c7b551b92ca069985 (patch) | |
tree | cef8f1aa1f9ef67e5e00e2a5346d5754791a81ac /arch/x86/mm | |
parent | e898c6706869fdcbd68b1e7fb0ac7461d98710fe (diff) |
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>
Diffstat (limited to 'arch/x86/mm')
-rw-r--r-- | arch/x86/mm/fault.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index f0b4caf85c1a..3ecfd1aaf214 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c | |||
@@ -615,7 +615,7 @@ pgtable_bad(struct pt_regs *regs, unsigned long error_code, | |||
615 | dump_pagetable(address); | 615 | dump_pagetable(address); |
616 | 616 | ||
617 | tsk->thread.cr2 = address; | 617 | tsk->thread.cr2 = address; |
618 | tsk->thread.trap_no = 14; | 618 | tsk->thread.trap_nr = X86_TRAP_PF; |
619 | tsk->thread.error_code = error_code; | 619 | tsk->thread.error_code = error_code; |
620 | 620 | ||
621 | if (__die("Bad pagetable", regs, error_code)) | 621 | if (__die("Bad pagetable", regs, error_code)) |
@@ -636,7 +636,7 @@ no_context(struct pt_regs *regs, unsigned long error_code, | |||
636 | /* Are we prepared to handle this kernel fault? */ | 636 | /* Are we prepared to handle this kernel fault? */ |
637 | if (fixup_exception(regs)) { | 637 | if (fixup_exception(regs)) { |
638 | if (current_thread_info()->sig_on_uaccess_error && signal) { | 638 | if (current_thread_info()->sig_on_uaccess_error && signal) { |
639 | tsk->thread.trap_no = 14; | 639 | tsk->thread.trap_nr = X86_TRAP_PF; |
640 | tsk->thread.error_code = error_code | PF_USER; | 640 | tsk->thread.error_code = error_code | PF_USER; |
641 | tsk->thread.cr2 = address; | 641 | tsk->thread.cr2 = address; |
642 | 642 | ||
@@ -676,7 +676,7 @@ no_context(struct pt_regs *regs, unsigned long error_code, | |||
676 | printk(KERN_EMERG "Thread overran stack, or stack corrupted\n"); | 676 | printk(KERN_EMERG "Thread overran stack, or stack corrupted\n"); |
677 | 677 | ||
678 | tsk->thread.cr2 = address; | 678 | tsk->thread.cr2 = address; |
679 | tsk->thread.trap_no = 14; | 679 | tsk->thread.trap_nr = X86_TRAP_PF; |
680 | tsk->thread.error_code = error_code; | 680 | tsk->thread.error_code = error_code; |
681 | 681 | ||
682 | sig = SIGKILL; | 682 | sig = SIGKILL; |
@@ -754,7 +754,7 @@ __bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code, | |||
754 | /* Kernel addresses are always protection faults: */ | 754 | /* Kernel addresses are always protection faults: */ |
755 | tsk->thread.cr2 = address; | 755 | tsk->thread.cr2 = address; |
756 | tsk->thread.error_code = error_code | (address >= TASK_SIZE); | 756 | tsk->thread.error_code = error_code | (address >= TASK_SIZE); |
757 | tsk->thread.trap_no = 14; | 757 | tsk->thread.trap_nr = X86_TRAP_PF; |
758 | 758 | ||
759 | force_sig_info_fault(SIGSEGV, si_code, address, tsk, 0); | 759 | force_sig_info_fault(SIGSEGV, si_code, address, tsk, 0); |
760 | 760 | ||
@@ -838,7 +838,7 @@ do_sigbus(struct pt_regs *regs, unsigned long error_code, unsigned long address, | |||
838 | 838 | ||
839 | tsk->thread.cr2 = address; | 839 | tsk->thread.cr2 = address; |
840 | tsk->thread.error_code = error_code; | 840 | tsk->thread.error_code = error_code; |
841 | tsk->thread.trap_no = 14; | 841 | tsk->thread.trap_nr = X86_TRAP_PF; |
842 | 842 | ||
843 | #ifdef CONFIG_MEMORY_FAILURE | 843 | #ifdef CONFIG_MEMORY_FAILURE |
844 | if (fault & (VM_FAULT_HWPOISON|VM_FAULT_HWPOISON_LARGE)) { | 844 | if (fault & (VM_FAULT_HWPOISON|VM_FAULT_HWPOISON_LARGE)) { |