Skip to content
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

k_cpu_atomic_idle failed @ARM #3173

Closed
zephyrbot opened this issue Feb 13, 2017 · 7 comments
Closed

k_cpu_atomic_idle failed @ARM #3173

zephyrbot opened this issue Feb 13, 2017 · 7 comments
Labels
area: ARM ARM (32-bit) Architecture bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@zephyrbot
Copy link
Collaborator

zephyrbot commented Feb 13, 2017

Reported by Sharron LIU:

I added test point to cover "k_cpu_atomic_idle", following the usage mentioned in https://www.zephyrproject.org/doc/kernel/other/cpu_idle.html.

Here's the test case:
https://gerrit.zephyrproject.org/r/#/c/11187

The test passed @x86 @arc, but failed @arm (qemu_cortex_m3). When look into "arch/arm/core/cpu_idle.S:159" this feature supposed to be supported.

(Imported from Jira ZEP-1720)

@zephyrbot
Copy link
Collaborator Author

by Maureen Helm:

I've started taking a look at this, and reproduced on FRDM-K64F and FRDM-KW41Z.

@zephyrbot
Copy link
Collaborator Author

by Benjamin Walsh:

Dunno why it fails on real hardware, but I'm 99% sure WFE is implemented as a NOP on QEMU. Actually, the ARM specs says that WFE can be implemented as a NOP. Same for WFI BTW.

@zephyrbot
Copy link
Collaborator Author

by Maureen Helm:

The test fails because it assumes the tick will increment after returning from k_cpu_atomic_idle(). I can get the test to pass on real hardware by changing the wfe to sev; wfe; wfe. This handles the case that the event register is already set before the wfe. But it doesn't help qemu.

@zephyrbot
Copy link
Collaborator Author

by Benjamin Walsh:

Test is bogus on QEMU. :-/

I think they expect the only event to occur to be the timer interrupt, and they align on a tick just before going idle to be sure that no interrupt is pending. Is it possible the hardware is receiving other interrupts ?

@zephyrbot
Copy link
Collaborator Author

by Anas Nashif:

test is bogus, so lower priority to avoid blocking a release because of a test...

@zephyrbot
Copy link
Collaborator Author

by Sharron LIU:

test case updated. test point "k_cpu_atomic_idle" disabled for CONFIG_ARM=y.

@zephyrbot zephyrbot added priority: low Low impact/importance bug area: ARM ARM (32-bit) Architecture bug The issue is a bug, or the PR is fixing a bug labels Sep 23, 2017
@nashif
Copy link
Member

nashif commented Jul 13, 2018

closing, nothing to be done here it seems.

@nashif nashif closed this as completed Jul 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ARM ARM (32-bit) Architecture bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
Development

No branches or pull requests

2 participants