The Allwinner H3 contains a set of 32 spinlock registers.
These are a nice luxury and make it easy to implement spinlocks.
The linux kernel makes wide use of spinlocks without any recourse
to the special hardware provided in the H3. This is a topic worthy
of study, in particular the implementation on the ARM.