armv8pmu_write_counter: sign-extend properly
ihk_mc_event_set_period() calls armv8pmu_write_counter() by cpu_pmu.write_counter(..., (uint64_t)(-left) & max_period) Change-Id: I2ac8fbe5957db044ac54946f620163e3c486cb5f
This commit is contained in:
@ -590,7 +590,7 @@ static inline void armv8pmu_write_counter(int idx, uint32_t value)
|
||||
* count using the lower 32bits and we want an interrupt when
|
||||
* it overflows.
|
||||
*/
|
||||
uint64_t value64 = 0xffffffff00000000ULL | value;
|
||||
uint64_t value64 = (int32_t)value;
|
||||
|
||||
write_sysreg(value64, pmccntr_el0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user