[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [PATCH v10 14/14] target/arm: Send interrupts on PMU coun
From: |
Richard Henderson |
Subject: |
Re: [Qemu-arm] [PATCH v10 14/14] target/arm: Send interrupts on PMU counter overflow |
Date: |
Sat, 19 Jan 2019 08:58:36 +1100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
On 1/19/19 8:40 AM, Aaron Lindsay wrote:
> In practice, I think only the 32nd bit would ever need to be cleared,
> but I agree it is more correct to clear them all.
>
>> Given that it is architecturally defined to 32-bits, I think you could really
>> just drop the define and use
>>
>> uint32_t new_pmevcntr = ...;
>> if (env->cp15.c14_pmevcntr[counter] & ~new_pmevcntr & INT32_MIN)
>>
>> with equal clarity.
>
> I don't know whether it is important for the resolution of this patch,
> but what did you mean by the following?:
>
>> The type of new_pmevcntr means you don't have to clear any
>> high bits either.
If you use uint32_t, then no *explicit* clearing of the high bits is necessary,
and is implied by the assignment back to env->cp15.c14_pmevcntr[counter].
r~