sw64: perf: fix PMI with no event
Sunway inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5XTIW -------------------------------- For perf disable PMU, this then presents the following error condition in processes schedule: Process A Process B Disable irq <PMC overflow> Disable PMU Enable irq <PMI comes> ->sw64_perf_event_irq_handler() When irq is disabled, PMC may still overflow then a PMI triggers. After another process is scheduled and irq is enabled, this PMI will raise immediately. To avoid this, clear interrupt flag in hmcode when it disable PMU. However, in kernel, events that do not exist will return directly. Signed-off-by: NHe Chuyue <hechuyue@wxiat.com> Reviewed-by: NHe Sheng <hesheng@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
Showing
想要评论请 注册 或 登录