Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 56669
b: refs/heads/master
c: 6c977aa
h: refs/heads/master
i:
  56667: a7b07e5
v: v3
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed May 21, 2007
1 parent 98ab471 commit e77c831
Show file tree
Hide file tree
Showing 2 changed files with 9 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: 4c87b948b258829f0bdffe51baa72fba5c42d359
refs/heads/master: 6c977aad03a18019015035958c65b6729cd0574c
9 changes: 8 additions & 1 deletion trunk/arch/i386/oprofile/nmi_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ static void nmi_save_registers(void * dummy)
{
int cpu = smp_processor_id();
struct op_msrs * msrs = &cpu_msrs[cpu];
model->fill_in_addresses(msrs);
nmi_cpu_save_registers(msrs);
}

Expand Down Expand Up @@ -195,6 +194,7 @@ static struct notifier_block profile_exceptions_nb = {
static int nmi_setup(void)
{
int err=0;
int cpu;

if (!allocate_msrs())
return -ENOMEM;
Expand All @@ -207,6 +207,13 @@ static int nmi_setup(void)
/* We need to serialize save and setup for HT because the subset
* of msrs are distinct for save and setup operations
*/

/* Assume saved/restored counters are the same on all CPUs */
model->fill_in_addresses(&cpu_msrs[0]);
for_each_possible_cpu (cpu) {
if (cpu != 0)
cpu_msrs[cpu] = cpu_msrs[0];
}
on_each_cpu(nmi_save_registers, NULL, 0, 1);
on_each_cpu(nmi_cpu_setup, NULL, 0, 1);
nmi_enabled = 1;
Expand Down

0 comments on commit e77c831

Please sign in to comment.