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/kernel/traps.c | |
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/kernel/traps.c')
-rw-r--r-- | arch/x86/kernel/traps.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c index 037fc2bc5316..c6d17ad59b8a 100644 --- a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c | |||
@@ -132,7 +132,7 @@ do_trap(int trapnr, int signr, char *str, struct pt_regs *regs, | |||
132 | trap_signal: | 132 | trap_signal: |
133 | #endif | 133 | #endif |
134 | /* | 134 | /* |
135 | * We want error_code and trap_no set for userspace faults and | 135 | * We want error_code and trap_nr set for userspace faults and |
136 | * kernelspace faults which result in die(), but not | 136 | * kernelspace faults which result in die(), but not |
137 | * kernelspace faults which are fixed up. die() gives the | 137 | * kernelspace faults which are fixed up. die() gives the |
138 | * process no chance to handle the signal and notice the | 138 | * process no chance to handle the signal and notice the |
@@ -141,7 +141,7 @@ trap_signal: | |||
141 | * delivered, faults. See also do_general_protection below. | 141 | * delivered, faults. See also do_general_protection below. |
142 | */ | 142 | */ |
143 | tsk->thread.error_code = error_code; | 143 | tsk->thread.error_code = error_code; |
144 | tsk->thread.trap_no = trapnr; | 144 | tsk->thread.trap_nr = trapnr; |
145 | 145 | ||
146 | #ifdef CONFIG_X86_64 | 146 | #ifdef CONFIG_X86_64 |
147 | if (show_unhandled_signals && unhandled_signal(tsk, signr) && | 147 | if (show_unhandled_signals && unhandled_signal(tsk, signr) && |
@@ -164,7 +164,7 @@ trap_signal: | |||
164 | kernel_trap: | 164 | kernel_trap: |
165 | if (!fixup_exception(regs)) { | 165 | if (!fixup_exception(regs)) { |
166 | tsk->thread.error_code = error_code; | 166 | tsk->thread.error_code = error_code; |
167 | tsk->thread.trap_no = trapnr; | 167 | tsk->thread.trap_nr = trapnr; |
168 | die(str, regs, error_code); | 168 | die(str, regs, error_code); |
169 | } | 169 | } |
170 | return; | 170 | return; |
@@ -240,7 +240,7 @@ dotraplinkage void do_double_fault(struct pt_regs *regs, long error_code) | |||
240 | notify_die(DIE_TRAP, str, regs, error_code, X86_TRAP_DF, SIGSEGV); | 240 | notify_die(DIE_TRAP, str, regs, error_code, X86_TRAP_DF, SIGSEGV); |
241 | 241 | ||
242 | tsk->thread.error_code = error_code; | 242 | tsk->thread.error_code = error_code; |
243 | tsk->thread.trap_no = X86_TRAP_DF; | 243 | tsk->thread.trap_nr = X86_TRAP_DF; |
244 | 244 | ||
245 | /* | 245 | /* |
246 | * This is always a kernel trap and never fixable (and thus must | 246 | * This is always a kernel trap and never fixable (and thus must |
@@ -268,7 +268,7 @@ do_general_protection(struct pt_regs *regs, long error_code) | |||
268 | goto gp_in_kernel; | 268 | goto gp_in_kernel; |
269 | 269 | ||
270 | tsk->thread.error_code = error_code; | 270 | tsk->thread.error_code = error_code; |
271 | tsk->thread.trap_no = X86_TRAP_GP; | 271 | tsk->thread.trap_nr = X86_TRAP_GP; |
272 | 272 | ||
273 | if (show_unhandled_signals && unhandled_signal(tsk, SIGSEGV) && | 273 | if (show_unhandled_signals && unhandled_signal(tsk, SIGSEGV) && |
274 | printk_ratelimit()) { | 274 | printk_ratelimit()) { |
@@ -295,7 +295,7 @@ gp_in_kernel: | |||
295 | return; | 295 | return; |
296 | 296 | ||
297 | tsk->thread.error_code = error_code; | 297 | tsk->thread.error_code = error_code; |
298 | tsk->thread.trap_no = X86_TRAP_GP; | 298 | tsk->thread.trap_nr = X86_TRAP_GP; |
299 | if (notify_die(DIE_GPF, "general protection fault", regs, error_code, | 299 | if (notify_die(DIE_GPF, "general protection fault", regs, error_code, |
300 | X86_TRAP_GP, SIGSEGV) == NOTIFY_STOP) | 300 | X86_TRAP_GP, SIGSEGV) == NOTIFY_STOP) |
301 | return; | 301 | return; |
@@ -475,7 +475,7 @@ void math_error(struct pt_regs *regs, int error_code, int trapnr) | |||
475 | { | 475 | { |
476 | if (!fixup_exception(regs)) { | 476 | if (!fixup_exception(regs)) { |
477 | task->thread.error_code = error_code; | 477 | task->thread.error_code = error_code; |
478 | task->thread.trap_no = trapnr; | 478 | task->thread.trap_nr = trapnr; |
479 | die(str, regs, error_code); | 479 | die(str, regs, error_code); |
480 | } | 480 | } |
481 | return; | 481 | return; |
@@ -485,7 +485,7 @@ void math_error(struct pt_regs *regs, int error_code, int trapnr) | |||
485 | * Save the info for the exception handler and clear the error. | 485 | * Save the info for the exception handler and clear the error. |
486 | */ | 486 | */ |
487 | save_init_fpu(task); | 487 | save_init_fpu(task); |
488 | task->thread.trap_no = trapnr; | 488 | task->thread.trap_nr = trapnr; |
489 | task->thread.error_code = error_code; | 489 | task->thread.error_code = error_code; |
490 | info.si_signo = SIGFPE; | 490 | info.si_signo = SIGFPE; |
491 | info.si_errno = 0; | 491 | info.si_errno = 0; |