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

Daniel Axtens dja at axtens.net
Thu Jun 25 15:02:14 AEST 2015


> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 860 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20150625/9f7fa3ca/attachment.sig>


More information about the Linuxppc-dev mailing list