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

From: Anshuman Khandual <[email-masked]>
Date: Thu, 25 Jun 2015 18:21:48 +0530

On 06/25/2015 10:32 AM, Daniel Axtens wrote:
> 
>> 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?

Yeah it should be, will change it.

> 
>> -	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.

Sure, will change it.