Commit 25e29c7c authored by Will Deacon's avatar Will Deacon

ARM: perf: use integers for ARMv7 event indices

This patch ensures that integers are used to represent event indices in
the ARMv7 PMU backend. This ensures consistency between functions and
also with the arm_pmu structure.
Acked-by: default avatarJamie Iles <jamie@jamieiles.com>
Reviewed-by: default avatarJean Pihet <j-pihet@ti.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent 6330aae7
...@@ -793,7 +793,7 @@ static inline int armv7_pmnc_counter_has_overflowed(u32 pmnc, ...@@ -793,7 +793,7 @@ static inline int armv7_pmnc_counter_has_overflowed(u32 pmnc,
return ret; return ret;
} }
static inline int armv7_pmnc_select_counter(unsigned int idx) static inline int armv7_pmnc_select_counter(int idx)
{ {
u32 val; u32 val;
...@@ -840,7 +840,7 @@ static inline void armv7pmu_write_counter(int idx, u32 value) ...@@ -840,7 +840,7 @@ static inline void armv7pmu_write_counter(int idx, u32 value)
smp_processor_id(), idx); smp_processor_id(), idx);
} }
static inline void armv7_pmnc_write_evtsel(unsigned int idx, u32 val) static inline void armv7_pmnc_write_evtsel(int idx, u32 val)
{ {
if (armv7_pmnc_select_counter(idx) == idx) { if (armv7_pmnc_select_counter(idx) == idx) {
val &= ARMV7_EVTSEL_MASK; val &= ARMV7_EVTSEL_MASK;
...@@ -848,7 +848,7 @@ static inline void armv7_pmnc_write_evtsel(unsigned int idx, u32 val) ...@@ -848,7 +848,7 @@ static inline void armv7_pmnc_write_evtsel(unsigned int idx, u32 val)
} }
} }
static inline u32 armv7_pmnc_enable_counter(unsigned int idx) static inline int armv7_pmnc_enable_counter(int idx)
{ {
u32 val; u32 val;
...@@ -869,7 +869,7 @@ static inline u32 armv7_pmnc_enable_counter(unsigned int idx) ...@@ -869,7 +869,7 @@ static inline u32 armv7_pmnc_enable_counter(unsigned int idx)
return idx; return idx;
} }
static inline u32 armv7_pmnc_disable_counter(unsigned int idx) static inline int armv7_pmnc_disable_counter(int idx)
{ {
u32 val; u32 val;
...@@ -891,7 +891,7 @@ static inline u32 armv7_pmnc_disable_counter(unsigned int idx) ...@@ -891,7 +891,7 @@ static inline u32 armv7_pmnc_disable_counter(unsigned int idx)
return idx; return idx;
} }
static inline u32 armv7_pmnc_enable_intens(unsigned int idx) static inline int armv7_pmnc_enable_intens(int idx)
{ {
u32 val; u32 val;
...@@ -912,7 +912,7 @@ static inline u32 armv7_pmnc_enable_intens(unsigned int idx) ...@@ -912,7 +912,7 @@ static inline u32 armv7_pmnc_enable_intens(unsigned int idx)
return idx; return idx;
} }
static inline u32 armv7_pmnc_disable_intens(unsigned int idx) static inline int armv7_pmnc_disable_intens(int idx)
{ {
u32 val; u32 val;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment