Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork841
Does SpinMutex from spin crate not work on aarch64?#132
-
Hi! |
BetaWas this translation helpful?Give feedback.
All reactions
Spin lock uses atomics under the hood, but atomics work on ARM only if you have MMU configured and enabled. MMU is introduced later than theNullLock
, so I assume that is the case (it was in my case).
The forever spinning isn't really spinning - CPU raises an exception, but you must have not configured the handler yet so it raises an exception from an exception handler, freezing forever (cause handlers are introduced even after MMU).
Replies: 2 comments
-
Spin lock uses atomics under the hood, but atomics work on ARM only if you have MMU configured and enabled. MMU is introduced later than the The forever spinning isn't really spinning - CPU raises an exception, but you must have not configured the handler yet so it raises an exception from an exception handler, freezing forever (cause handlers are introduced even after MMU). |
BetaWas this translation helpful?Give feedback.
All reactions
👍 2
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
What@jakubfijalkowski says. On the RPi you get an exception, if you have them enabled already, if you try atomics on non-cacheable memory. There is also a hint starting tutorial 10 in rust-raspberrypi-OS-tutorials/10_virtual_mem_part1_identity_mapping/src/main.rs Lines 134 to 142 inea8ef5a
Implementation of exclusive load/store (atomics) is often tied to / implemented on top of the CPU’s cache (leveraging the HW-coherency it provides). |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1