Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 155709
b: refs/heads/master
c: 984b838
h: refs/heads/master
i:
  155707: 55f08e1
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Jul 10, 2009
1 parent 8c1e72f commit 8e38cf3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 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: 9c74fb50867e8fb5f3be3be06716492c0f79309e
refs/heads/master: 984b838ce69c063a91b87550598ab7f3439dd94a
16 changes: 8 additions & 8 deletions trunk/arch/x86/kernel/cpu/perf_counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -874,13 +874,13 @@ static void amd_pmu_enable_all(void)
barrier();

for (idx = 0; idx < x86_pmu.num_counters; idx++) {
struct perf_counter *counter = cpuc->counters[idx];
u64 val;

if (!test_bit(idx, cpuc->active_mask))
continue;
rdmsrl(MSR_K7_EVNTSEL0 + idx, val);
if (val & ARCH_PERFMON_EVENTSEL0_ENABLE)
continue;

val = counter->hw.config;
val |= ARCH_PERFMON_EVENTSEL0_ENABLE;
wrmsrl(MSR_K7_EVNTSEL0 + idx, val);
}
Expand Down Expand Up @@ -1044,11 +1044,13 @@ intel_pmu_enable_fixed(struct hw_perf_counter *hwc, int __idx)
static void p6_pmu_enable_counter(struct hw_perf_counter *hwc, int idx)
{
struct cpu_hw_counters *cpuc = &__get_cpu_var(cpu_hw_counters);
u64 val;

val = hwc->config;
if (cpuc->enabled)
x86_pmu_enable_counter(hwc, idx);
else
x86_pmu_disable_counter(hwc, idx);
val |= ARCH_PERFMON_EVENTSEL0_ENABLE;

(void)checking_wrmsrl(hwc->config_base + idx, val);
}


Expand All @@ -1068,8 +1070,6 @@ static void amd_pmu_enable_counter(struct hw_perf_counter *hwc, int idx)

if (cpuc->enabled)
x86_pmu_enable_counter(hwc, idx);
else
x86_pmu_disable_counter(hwc, idx);
}

static int
Expand Down

0 comments on commit 8e38cf3

Please sign in to comment.