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

Anshuman Khandual khandual at linux.vnet.ibm.com
Thu Jun 25 22:51:48 AEST 2015


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.



More information about the Linuxppc-dev mailing list