Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 276385
b: refs/heads/master
c: 97f7f81
h: refs/heads/master
i:
  276383: be6a22b
v: v3
  • Loading branch information
Robert Richter committed Nov 4, 2011
1 parent 2cbff10 commit d39f73e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 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: 87121ca504fd1d963a66b3fb0c72054b0fd9a177
refs/heads/master: 97f7f8189fe54e3cfe324ef9ad35064f3d2d3bff
7 changes: 5 additions & 2 deletions trunk/arch/x86/oprofile/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ extern int op_nmi_timer_init(struct oprofile_operations *ops);
extern void op_nmi_exit(void);
extern void x86_backtrace(struct pt_regs * const regs, unsigned int depth);

static int nmi_timer;

int __init oprofile_arch_init(struct oprofile_operations *ops)
{
Expand All @@ -31,8 +32,9 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
#ifdef CONFIG_X86_LOCAL_APIC
ret = op_nmi_init(ops);
#endif
nmi_timer = (ret != 0);
#ifdef CONFIG_X86_IO_APIC
if (ret < 0)
if (nmi_timer)
ret = op_nmi_timer_init(ops);
#endif
ops->backtrace = x86_backtrace;
Expand All @@ -44,6 +46,7 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
void oprofile_arch_exit(void)
{
#ifdef CONFIG_X86_LOCAL_APIC
op_nmi_exit();
if (!nmi_timer)
op_nmi_exit();
#endif
}

0 comments on commit d39f73e

Please sign in to comment.