Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 99804
b: refs/heads/master
c: c6425b9
h: refs/heads/master
v: v3
  • Loading branch information
Cyrill Gorcunov authored and Thomas Gleixner committed May 25, 2008
1 parent 0e2ef83 commit aa6e833
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 26 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: e56b3a12c45e439169f2d1f7194be397667320a6
refs/heads/master: c6425b9f143a75bbcd0a7684b4df40e20d0b2f32
25 changes: 0 additions & 25 deletions trunk/arch/x86/kernel/nmi_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@

int unknown_nmi_panic;
int nmi_watchdog_enabled;
int panic_on_unrecovered_nmi;

static cpumask_t backtrace_mask = CPU_MASK_NONE;

Expand Down Expand Up @@ -383,30 +382,6 @@ nmi_watchdog_tick(struct pt_regs *regs, unsigned reason)
return rc;
}

static unsigned ignore_nmis;

asmlinkage notrace __kprobes void
do_nmi(struct pt_regs *regs, long error_code)
{
nmi_enter();
add_pda(__nmi_count,1);
if (!ignore_nmis)
default_do_nmi(regs);
nmi_exit();
}

void stop_nmi(void)
{
acpi_nmi_disable();
ignore_nmis++;
}

void restart_nmi(void)
{
ignore_nmis--;
acpi_nmi_enable();
}

#ifdef CONFIG_SYSCTL

static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu)
Expand Down
24 changes: 24 additions & 0 deletions trunk/arch/x86/kernel/traps_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ asmlinkage void alignment_check(void);
asmlinkage void machine_check(void);
asmlinkage void spurious_interrupt_bug(void);

int panic_on_unrecovered_nmi;
static unsigned int code_bytes = 64;
static unsigned ignore_nmis;

static inline void conditional_sti(struct pt_regs *regs)
{
Expand Down Expand Up @@ -867,6 +869,28 @@ asmlinkage notrace __kprobes void default_do_nmi(struct pt_regs *regs)
io_check_error(reason, regs);
}

asmlinkage notrace __kprobes void
do_nmi(struct pt_regs *regs, long error_code)
{
nmi_enter();
add_pda(__nmi_count, 1);
if (!ignore_nmis)
default_do_nmi(regs);
nmi_exit();
}

void stop_nmi(void)
{
acpi_nmi_disable();
ignore_nmis++;
}

void restart_nmi(void)
{
ignore_nmis--;
acpi_nmi_enable();
}

/* runs on IST stack. */
asmlinkage void __kprobes do_int3(struct pt_regs * regs, long error_code)
{
Expand Down

0 comments on commit aa6e833

Please sign in to comment.