perf_counter, x86: consistent use of type int for counter index
The type of counter index is sometimes implemented as unsigned int. This patch changes this to have a consistent usage of int. [ Impact: cleanup ] Signed-off-by: Robert Richter <robert.richter@amd.com> Cc: Paul Mackerras <paulus@samba.org> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <1241002046-8832-21-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
committed by
Ingo Molnar
parent
095342389e
commit
6f00cada07
@@ -459,7 +459,7 @@ static void hw_perf_disable(int idx, u64 config)
|
|||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
__pmc_fixed_disable(struct perf_counter *counter,
|
__pmc_fixed_disable(struct perf_counter *counter,
|
||||||
struct hw_perf_counter *hwc, unsigned int __idx)
|
struct hw_perf_counter *hwc, int __idx)
|
||||||
{
|
{
|
||||||
int idx = __idx - X86_PMC_IDX_FIXED;
|
int idx = __idx - X86_PMC_IDX_FIXED;
|
||||||
u64 ctrl_val, mask;
|
u64 ctrl_val, mask;
|
||||||
@@ -474,7 +474,7 @@ __pmc_fixed_disable(struct perf_counter *counter,
|
|||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
__x86_pmu_disable(struct perf_counter *counter,
|
__x86_pmu_disable(struct perf_counter *counter,
|
||||||
struct hw_perf_counter *hwc, unsigned int idx)
|
struct hw_perf_counter *hwc, int idx)
|
||||||
{
|
{
|
||||||
if (unlikely(hwc->config_base == MSR_ARCH_PERFMON_FIXED_CTR_CTRL))
|
if (unlikely(hwc->config_base == MSR_ARCH_PERFMON_FIXED_CTR_CTRL))
|
||||||
__pmc_fixed_disable(counter, hwc, idx);
|
__pmc_fixed_disable(counter, hwc, idx);
|
||||||
@@ -523,7 +523,7 @@ x86_perf_counter_set_period(struct perf_counter *counter,
|
|||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
__pmc_fixed_enable(struct perf_counter *counter,
|
__pmc_fixed_enable(struct perf_counter *counter,
|
||||||
struct hw_perf_counter *hwc, unsigned int __idx)
|
struct hw_perf_counter *hwc, int __idx)
|
||||||
{
|
{
|
||||||
int idx = __idx - X86_PMC_IDX_FIXED;
|
int idx = __idx - X86_PMC_IDX_FIXED;
|
||||||
u64 ctrl_val, bits, mask;
|
u64 ctrl_val, bits, mask;
|
||||||
@@ -691,7 +691,7 @@ static void x86_pmu_disable(struct perf_counter *counter)
|
|||||||
{
|
{
|
||||||
struct cpu_hw_counters *cpuc = &__get_cpu_var(cpu_hw_counters);
|
struct cpu_hw_counters *cpuc = &__get_cpu_var(cpu_hw_counters);
|
||||||
struct hw_perf_counter *hwc = &counter->hw;
|
struct hw_perf_counter *hwc = &counter->hw;
|
||||||
unsigned int idx = hwc->idx;
|
int idx = hwc->idx;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Must be done before we disable, otherwise the nmi handler
|
* Must be done before we disable, otherwise the nmi handler
|
||||||
|
@@ -318,7 +318,7 @@ struct hw_perf_counter {
|
|||||||
unsigned long config_base;
|
unsigned long config_base;
|
||||||
unsigned long counter_base;
|
unsigned long counter_base;
|
||||||
int nmi;
|
int nmi;
|
||||||
unsigned int idx;
|
int idx;
|
||||||
};
|
};
|
||||||
union { /* software */
|
union { /* software */
|
||||||
atomic64_t count;
|
atomic64_t count;
|
||||||
|
Reference in New Issue
Block a user