[PATCH V9 02/13] powerpc, perf: Change type of the bhrb_users variable
Anshuman Khandual
khandual at linux.vnet.ibm.com
Thu Jun 25 22:51:21 AEST 2015
On 06/25/2015 11:12 AM, Daniel Axtens wrote:
>> - int bhrb_users;
>> + unsigned int bhrb_users;
>
> OK, so this is a good start.
>
> A quick git grep for bhrb_users reveals this:
> perf/core-book3s.c: WARN_ON_ONCE(cpuhw->bhrb_users < 0);
>
> That occurs in power_pmu_bhrb_disable, immediately following a decrement
> of bhrb_users. Now that the test can never be true, this patch should
> change the function to check if bhrb_users is 0 before decrementing.
Sure. Would replace with 'WARN_ON_ONCE(!cpuhw->bhrb_users)' before
decrementing bhrb_users in the function.
More information about the Linuxppc-dev
mailing list