About the interrupt handling in GIC

I am using Linaro's Android release on Juno r1 and trying to make use of performance monitor. I want to use the PMU to count each retired instruction in a specific application, however, the overflow interrupt of PMU makes me a little confused. When the performance counter reaches its maximum value(0xffffffff), a overflow interrupt will be generated after the next instruction is retired. Also, the counter should be 0 after the next instruction is retired. In my case, the overflow interrupt is configured to be secure interrupt. However, when the interrupt arrives in EL3, i found that the value of performance counter is a small value instead of 0. As i configured the PMU to count the retired instructions in non-secure EL0 only, I guess the non-zero value of PMU means that the interrupt is generated in an asynchronous manner. When the PMU of processor A overflows, it signals a interrupt request to the GIC. But before the GIC actually asserts the interrupt to the processor A, the processor A is still executing instructions of the application.

Is there anyway to make it synchronous? After the processor signals the interrupt request, i hope it will wait for the interrupt instead of continuing executing other instructions.

Thanks very much for any help!

Parents Reply Children
No data
More questions in this forum