-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Zephyr] kernel/timer/timer_monotonic fails on 6.2-based QEMU #66
Comments
I cannot reproduce or debug this issue without a qemu command that executes this and a binary. |
|
This patches makes counter only appear to reset after the timer interrupt gets to be served. Also removed the condition that would make timers less reactive.
Test passes with new fix in commit 2625a6f. |
Indeed, results now are all clear:
Failed on
But that needs to be looked at separately. |
It seems this change is inflicting a problem on my linux images. it might be actually that it is revealing an issue in our Linux Kernel. That's why I filed one there. |
For some reason, this exact issue is still seen with the Zephyr SDK 0.14.1, which includes 2625a6f, although it is seen only in the AWS CI machine and not locally reproducible. |
This commit excludes the kernel syscall test for the `qemu_arc_em` platform because this test may fail with the ARC QEMU 6.2 on certain host systems. Refer to the following issues for more details: * foss-for-synopsys-dwc-arc-processors/qemu#66 * zephyrproject-rtos#44862 Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit excludes the kernel syscall test for the `qemu_arc_em` platform because this test may fail with the ARC QEMU 6.2 on certain host systems. Refer to the following issues for more details: * foss-for-synopsys-dwc-arc-processors/qemu#66 * zephyrproject-rtos/zephyr#44862 Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit excludes the kernel syscall test for the `qemu_arc_em` platform because this test may fail with the ARC QEMU 6.2 on certain host systems. Refer to the following issues for more details: * foss-for-synopsys-dwc-arc-processors/qemu#66 * #44862 Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit excludes the kernel syscall test for the `qemu_arc_em` platform because this test may fail with the ARC QEMU 6.2 on certain host systems. Refer to the following issues for more details: * foss-for-synopsys-dwc-arc-processors/qemu#66 * zephyrproject-rtos/zephyr#44862 Signed-off-by: Stephanos Ioannidis <[email protected]> GitOrigin-RevId: 9706404 Change-Id: I08b455a5f8474d14c3915a2ee58e6792d819d292 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/3596486 Tested-by: CopyBot Service Account <[email protected]> Reviewed-by: Al Semjonovs <[email protected]> Commit-Queue: Al Semjonovs <[email protected]> Tested-by: Al Semjonovs <[email protected]>
After further analysis of this issue with Claudiu, we got to the conclusion that my patch on QEMU is not Ok. Zephyr itself when reading the COUNT0 should be verifying if IP flag from CONTROL0 is not set by QEMU. Be aware that although less likely, mostly because we do not not have external sources of interrupts in our testing, that the same can happen in hardware, and for that reason the software is incorrect. |
The ARC timer driver checks and handles the IP flag, in the 'elapsed()' function. Can you elaborate what's not correct in the Zephyr driver? |
The refered test fails in the following:
Using QEMU, this test fails since the interrupt for the timer is not immediately handled, but rather only executed in the end of the TLB (i.e. a control-flow block). In the example above, the monotonicity of k_cycle_get_32() is verified. The Zephyr problem to my eyes is that the k_cycle_get_32 function is directly tied to what COUNT0 returns, which will be not monotonic for the Zephyr infrastructure, when IP flag is set. Looking at Zephyr code, without really trying it, I would assume that having
|
Zephyr 'elapsed' handles the wrapping/pending IP already, no need to add that to the count_register_get. |
Something that was actually correct in commit: 2625a6f
Here's the test source: https://github.com/zephyrproject-rtos/zephyr/tree/main/tests/kernel/timer/timer_monotonic
The text was updated successfully, but these errors were encountered: