[PATCH 1/2] powerpc: G4 oprofile: variable number of counters

Benjamin Herrenschmidt benh at kernel.crashing.org
Wed Feb 4 16:22:14 EST 2009


On Tue, 2009-01-06 at 14:55 +0200, Octavian Purdila wrote:
> For ppc750 processors which use 4 performance counters instead of the
> 6 G4 uses but otherwise is compatible with G4.
> 
> Signed-off-by: Octavian Purdila <opurdila at ixiacom.com>
> ---
>  arch/powerpc/oprofile/op_model_7450.c |   21 +++++++++++----------
>  1 files changed, 11 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/powerpc/oprofile/op_model_7450.c b/arch/powerpc/oprofile/op_model_7450.c
> index cc599eb..97348f5 100644
> --- a/arch/powerpc/oprofile/op_model_7450.c
> +++ b/arch/powerpc/oprofile/op_model_7450.c
> @@ -29,7 +29,7 @@
>  static unsigned long reset_value[OP_MAX_COUNTER];
>  
>  static int oprofile_running;
> -static u32 mmcr0_val, mmcr1_val, mmcr2_val;
> +static u32 mmcr0_val, mmcr1_val, mmcr2_val, ctrs;

This may be static but it's still a global scope as far as kernel
symbols are concerned. Care to give it a slightly better name ? num_pmcs
would probably be already more telling.

Cheers,
Ben.





More information about the Linuxppc-dev mailing list