Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 158226
b: refs/heads/master
c: 6bfccd0
h: refs/heads/master
v: v3
  • Loading branch information
Robert Richter committed Jul 20, 2009
1 parent 33b2015 commit e3c36db
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 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: 82a225283fb0d9438549595d9e6f3ecc42b42ad6
refs/heads/master: 6bfccd099c2841e1c42530f1b6d2553bfa13be3a
16 changes: 9 additions & 7 deletions trunk/arch/x86/oprofile/nmi_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ static int allocate_msrs(void)

#ifdef CONFIG_OPROFILE_EVENT_MULTIPLEX

static void nmi_setup_cpu_mux(struct op_msrs const * const msrs)
static void nmi_cpu_setup_mux(int cpu, struct op_msrs const * const msrs)
{
int i;
struct op_msr *multiplex = msrs->multiplex;
Expand All @@ -173,8 +173,15 @@ static void nmi_setup_cpu_mux(struct op_msrs const * const msrs)
multiplex[i].saved = 0;
}
}

per_cpu(switch_index, cpu) = 0;
}

#else

static inline void
nmi_cpu_setup_mux(int cpu, struct op_msrs const * const msrs) { }

#endif

static void nmi_cpu_setup(void *dummy)
Expand All @@ -184,9 +191,7 @@ static void nmi_cpu_setup(void *dummy)
nmi_cpu_save_registers(msrs);
spin_lock(&oprofilefs_lock);
model->setup_ctrs(model, msrs);
#ifdef CONFIG_OPROFILE_EVENT_MULTIPLEX
nmi_setup_cpu_mux(msrs);
#endif
nmi_cpu_setup_mux(cpu, msrs);
spin_unlock(&oprofilefs_lock);
per_cpu(saved_lvtpc, cpu) = apic_read(APIC_LVTPC);
apic_write(APIC_LVTPC, APIC_DM_NMI);
Expand Down Expand Up @@ -662,9 +667,6 @@ int __init op_nmi_init(struct oprofile_operations *ops)
register_cpu_notifier(&oprofile_cpu_nb);
#endif
/* default values, can be overwritten by model */
#ifdef CONFIG_OPROFILE_EVENT_MULTIPLEX
__raw_get_cpu_var(switch_index) = 0;
#endif
ops->create_files = nmi_create_files;
ops->setup = nmi_setup;
ops->shutdown = nmi_shutdown;
Expand Down

0 comments on commit e3c36db

Please sign in to comment.