tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: [2/2 ABI and toolchain part] Support Raspberry Pi [0-3] in big-endian mode

> Oops, it was wrong. ARM ARM "ARMv7-A and ARMv7-R edition", or, more
> concisely, their web page says swp{,b} instructions on ARMv7 work for
> MP system:
> | Limitations of SWP and SWPB
> | ...
> | In a multi-core system, preventing access to main memory for all
> | processors for the duration of a swap instruction can reduce
> | overall system performance.
> | ...
> So, I guess that mrg@ disabled swp{,b} for MULTIPROCESSOR not because
> instructions their-selves do not work, but because there are other
> problems for ARMv5 userland on MP environment. As Robert suggested in
> his previous message, multi-threaded applications for ARMv5 do not
> work on MP system. See port-arm/55704 by myself:
> Matthew, is this reason why you disabled them for MP kernel?

the above link and info aren't the full story.

swp and swpb are only guaranteed to work properly on the
same CPU they execute on, not all CPUs, for armv7.  they
reply upon features not required.  eg, see:

which says:

The SWP and SWPB instructions rely on the properties of
the system beyond the processor to ensure that no stores
from other observers can occur between the load access and
the store access, and this might not be implemented for
all regions of memory on some system implementations. In
all cases, SWP and SWPB do ensure that no stores from the
processor that executed the SWP or SWPB instruction can
occur between the load access and the store access of the

ie, the quoted text above doesn't mention that the support
for doing this isn't required.  there ares also bits in
ID_ISAR0 and ID_ISAR4 to show this.

there's another document on i can't find right now
that is more explicit.

but i found this post as well:

AFAICT, we need real emulation in both arm32 and arm64,
and for it to be used by default on armv6 and newer.


Home | Main Index | Thread Index | Old Index