Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147183
b: refs/heads/master
c: 2b583d8
h: refs/heads/master
i:
  147181: 327a537
  147179: 463cbbe
  147175: d2631f2
  147167: 7ddc48a
v: v3
  • Loading branch information
Jaswinder Singh Rajput authored and Ingo Molnar committed Dec 27, 2008
1 parent 1816d9a commit c1d81c3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 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: 01ea1ccaa24dea3552e103be13b7897211607a8b
refs/heads/master: 2b583d8bc8d7105b58d7481a4a0ceb718dac49c6
24 changes: 7 additions & 17 deletions trunk/arch/x86/kernel/cpu/perf_counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,6 @@ static int __hw_perf_counter_init(struct perf_counter *counter)
return 0;
}

void hw_perf_enable_all(void)
{
if (unlikely(!perf_counters_initialized))
return;

wrmsrl(MSR_CORE_PERF_GLOBAL_CTRL, perf_counter_mask);
}

u64 hw_perf_save_disable(void)
{
u64 ctrl;
Expand Down Expand Up @@ -200,12 +192,10 @@ static inline void
__pmc_generic_disable(struct perf_counter *counter,
struct hw_perf_counter *hwc, unsigned int idx)
{
int err;

if (unlikely(hwc->config_base == MSR_ARCH_PERFMON_FIXED_CTR_CTRL))
return __pmc_fixed_disable(counter, hwc, idx);

err = wrmsr_safe(hwc->config_base + idx, hwc->config, 0);
__pmc_fixed_disable(counter, hwc, idx);
else
wrmsr_safe(hwc->config_base + idx, hwc->config, 0);
}

static DEFINE_PER_CPU(u64, prev_left[X86_PMC_IDX_MAX]);
Expand Down Expand Up @@ -276,10 +266,10 @@ __pmc_generic_enable(struct perf_counter *counter,
struct hw_perf_counter *hwc, int idx)
{
if (unlikely(hwc->config_base == MSR_ARCH_PERFMON_FIXED_CTR_CTRL))
return __pmc_fixed_enable(counter, hwc, idx);

wrmsr(hwc->config_base + idx,
hwc->config | ARCH_PERFMON_EVENTSEL0_ENABLE, 0);
__pmc_fixed_enable(counter, hwc, idx);
else
wrmsr(hwc->config_base + idx,
hwc->config | ARCH_PERFMON_EVENTSEL0_ENABLE, 0);
}

static int
Expand Down

0 comments on commit c1d81c3

Please sign in to comment.