Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 310397
b: refs/heads/master
c: f898817
h: refs/heads/master
i:
  310395: 17c367b
v: v3
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed Jun 1, 2012
1 parent 2b641c9 commit f1de949
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 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: c0525a6972d3f1fb83058ef503e183475d6e4e26
refs/heads/master: f8988175fd70874d1fb3712b1c5d3bfc6d455202
8 changes: 7 additions & 1 deletion trunk/arch/x86/kernel/cpu/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1101,14 +1101,20 @@ int is_debug_stack(unsigned long addr)
addr > (__get_cpu_var(debug_stack_addr) - DEBUG_STKSZ));
}

static DEFINE_PER_CPU(u32, debug_stack_use_ctr);

void debug_stack_set_zero(void)
{
this_cpu_inc(debug_stack_use_ctr);
load_idt((const struct desc_ptr *)&nmi_idt_descr);
}

void debug_stack_reset(void)
{
load_idt((const struct desc_ptr *)&idt_descr);
if (WARN_ON(!this_cpu_read(debug_stack_use_ctr)))
return;
if (this_cpu_dec_return(debug_stack_use_ctr) == 0)
load_idt((const struct desc_ptr *)&idt_descr);
}

#else /* CONFIG_X86_64 */
Expand Down

0 comments on commit f1de949

Please sign in to comment.