aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/traps_32.c
diff options
context:
space:
mode:
authorAlexander van Heukelum <heukelum@mailshack.com>2008-10-03 17:17:11 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-13 04:33:27 -0400
commitc1d518c8422ff7d3f377958771b265753028579c (patch)
tree8a05f7510d0d9f41d144779822869835875d4c1a /arch/x86/kernel/traps_32.c
parenta5ae2330a5a6e7948866715a845ad2e8900bd4c2 (diff)
traps: x86: various noop-changes preparing for unification of traps_xx.c
- reordering include files - whitespace changes - comment changes - removed unused bad_intr() - make default_do_nmi static Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/traps_32.c')
-rw-r--r--arch/x86/kernel/traps_32.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/arch/x86/kernel/traps_32.c b/arch/x86/kernel/traps_32.c
index 01e7ca8c7661..076739863d24 100644
--- a/arch/x86/kernel/traps_32.c
+++ b/arch/x86/kernel/traps_32.c
@@ -7,13 +7,11 @@
7 */ 7 */
8 8
9/* 9/*
10 * 'Traps.c' handles hardware traps and faults after we have saved some 10 * Handle hardware traps and faults.
11 * state in 'asm.s'.
12 */ 11 */
13#include <linux/interrupt.h> 12#include <linux/interrupt.h>
14#include <linux/kallsyms.h> 13#include <linux/kallsyms.h>
15#include <linux/spinlock.h> 14#include <linux/spinlock.h>
16#include <linux/highmem.h>
17#include <linux/kprobes.h> 15#include <linux/kprobes.h>
18#include <linux/uaccess.h> 16#include <linux/uaccess.h>
19#include <linux/utsname.h> 17#include <linux/utsname.h>
@@ -32,6 +30,8 @@
32#include <linux/bug.h> 30#include <linux/bug.h>
33#include <linux/nmi.h> 31#include <linux/nmi.h>
34#include <linux/mm.h> 32#include <linux/mm.h>
33#include <linux/smp.h>
34#include <linux/io.h>
35 35
36#ifdef CONFIG_EISA 36#ifdef CONFIG_EISA
37#include <linux/ioport.h> 37#include <linux/ioport.h>
@@ -46,22 +46,26 @@
46#include <linux/edac.h> 46#include <linux/edac.h>
47#endif 47#endif
48 48
49#include <asm/processor-flags.h>
50#include <asm/arch_hooks.h>
51#include <asm/stacktrace.h> 49#include <asm/stacktrace.h>
52#include <asm/processor.h> 50#include <asm/processor.h>
51#include <asm/kmemcheck.h>
53#include <asm/debugreg.h> 52#include <asm/debugreg.h>
54#include <asm/atomic.h> 53#include <asm/atomic.h>
55#include <asm/system.h> 54#include <asm/system.h>
56#include <asm/unwind.h> 55#include <asm/unwind.h>
56#include <asm/traps.h>
57#include <asm/desc.h> 57#include <asm/desc.h>
58#include <asm/i387.h> 58#include <asm/i387.h>
59
60#include <mach_traps.h>
61
62#include <asm/processor-flags.h>
63#include <asm/arch_hooks.h>
59#include <asm/nmi.h> 64#include <asm/nmi.h>
60#include <asm/smp.h> 65#include <asm/smp.h>
61#include <asm/io.h> 66#include <asm/io.h>
62#include <asm/traps.h> 67#include <asm/traps.h>
63 68
64#include "mach_traps.h"
65#include "cpu/mcheck/mce.h" 69#include "cpu/mcheck/mce.h"
66 70
67DECLARE_BITMAP(used_vectors, NR_VECTORS); 71DECLARE_BITMAP(used_vectors, NR_VECTORS);
@@ -340,7 +344,8 @@ io_check_error(unsigned char reason, struct pt_regs *regs)
340static notrace __kprobes void 344static notrace __kprobes void
341unknown_nmi_error(unsigned char reason, struct pt_regs *regs) 345unknown_nmi_error(unsigned char reason, struct pt_regs *regs)
342{ 346{
343 if (notify_die(DIE_NMIUNKNOWN, "nmi", regs, reason, 2, SIGINT) == NOTIFY_STOP) 347 if (notify_die(DIE_NMIUNKNOWN, "nmi", regs, reason, 2, SIGINT) ==
348 NOTIFY_STOP)
344 return; 349 return;
345#ifdef CONFIG_MCA 350#ifdef CONFIG_MCA
346 /* 351 /*
@@ -446,13 +451,9 @@ static notrace __kprobes void default_do_nmi(struct pt_regs *regs)
446dotraplinkage notrace __kprobes void 451dotraplinkage notrace __kprobes void
447do_nmi(struct pt_regs *regs, long error_code) 452do_nmi(struct pt_regs *regs, long error_code)
448{ 453{
449 int cpu;
450
451 nmi_enter(); 454 nmi_enter();
452 455
453 cpu = smp_processor_id(); 456 { int cpu; cpu = smp_processor_id(); ++nmi_count(cpu); }
454
455 ++nmi_count(cpu);
456 457
457 if (!ignore_nmis) 458 if (!ignore_nmis)
458 default_do_nmi(regs); 459 default_do_nmi(regs);
@@ -472,6 +473,7 @@ void restart_nmi(void)
472 acpi_nmi_enable(); 473 acpi_nmi_enable();
473} 474}
474 475
476/* May run on IST stack. */
475dotraplinkage void __kprobes do_int3(struct pt_regs *regs, long error_code) 477dotraplinkage void __kprobes do_int3(struct pt_regs *regs, long error_code)
476{ 478{
477#ifdef CONFIG_KPROBES 479#ifdef CONFIG_KPROBES
@@ -510,6 +512,8 @@ dotraplinkage void __kprobes do_int3(struct pt_regs *regs, long error_code)
510 * about restoring all the debug state, and ptrace doesn't have to 512 * about restoring all the debug state, and ptrace doesn't have to
511 * find every occurrence of the TF bit that could be saved away even 513 * find every occurrence of the TF bit that could be saved away even
512 * by user code) 514 * by user code)
515 *
516 * May run on IST stack.
513 */ 517 */
514dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code) 518dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code)
515{ 519{