Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 158221
b: refs/heads/master
c: 44ab9a6
h: refs/heads/master
i:
  158219: 3245704
v: v3
  • Loading branch information
Robert Richter committed Jul 14, 2009
1 parent 916af35 commit 7b3610e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 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: 8045a4c293d36c61656a20d581b11f7f0cd7acd5
refs/heads/master: 44ab9a6b0e909145d42615493952fe986b1ce5c2
13 changes: 3 additions & 10 deletions trunk/arch/x86/oprofile/nmi_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,6 @@ static void nmi_cpu_save_registers(struct op_msrs *msrs)
}
}

static void nmi_save_registers(void *dummy)
{
int cpu = smp_processor_id();
struct op_msrs *msrs = &per_cpu(cpu_msrs, cpu);
nmi_cpu_save_registers(msrs);
}

static void free_msrs(void)
{
int i;
Expand Down Expand Up @@ -137,6 +130,7 @@ static void nmi_cpu_setup(void *dummy)
{
int cpu = smp_processor_id();
struct op_msrs *msrs = &per_cpu(cpu_msrs, cpu);
nmi_cpu_save_registers(msrs);
spin_lock(&oprofilefs_lock);
model->setup_ctrs(model, msrs);
spin_unlock(&oprofilefs_lock);
Expand Down Expand Up @@ -182,13 +176,12 @@ static int nmi_setup(void)
}

}
on_each_cpu(nmi_save_registers, NULL, 1);
on_each_cpu(nmi_cpu_setup, NULL, 1);
nmi_enabled = 1;
return 0;
}

static void nmi_restore_registers(struct op_msrs *msrs)
static void nmi_cpu_restore_registers(struct op_msrs *msrs)
{
struct op_msr *counters = msrs->counters;
struct op_msr *controls = msrs->controls;
Expand Down Expand Up @@ -220,7 +213,7 @@ static void nmi_cpu_shutdown(void *dummy)
apic_write(APIC_LVTERR, v | APIC_LVT_MASKED);
apic_write(APIC_LVTPC, per_cpu(saved_lvtpc, cpu));
apic_write(APIC_LVTERR, v);
nmi_restore_registers(msrs);
nmi_cpu_restore_registers(msrs);
}

static void nmi_shutdown(void)
Expand Down

0 comments on commit 7b3610e

Please sign in to comment.