Subject: Re: [PATCH V9 04/13] powerpc, perf: Restore privilege level filter support for BHRB

From: Daniel Axtens <[email-masked]>
Date: Thu, 25 Jun 2015 15:02:14 +1000

> diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c
> index 7a03cce..892340e 100644
> --- a/arch/powerpc/perf/core-book3s.c
> +++ b/arch/powerpc/perf/core-book3s.c
> @@ -930,7 +930,7 @@ static int power_check_constraints(struct cpu_hw_events *cpuhw,
>   * added events.
>   */
>  static int check_excludes(struct perf_event **ctrs, unsigned int cflags[],
> -			  int n_prev, int n_new)
> +			  int n_prev, int n_new, int bhrb_users)
Shouldn't this be an unsigned int too?

> -	if (ppmu->flags & PPMU_ARCH_207S)
> +	if ((ppmu->flags & PPMU_ARCH_207S) && !bhrb_users)
This is now different to the others. Now that bhrb_users is unsigned,
I'm happy if you want to revert all of them to be like this, I was just
concerned that if bhrb_users is an int, both 1 and -1 evaluate to true
and I wasn't sure that was the desired behaviour.

-- 
Regards,
Daniel