[Bug 503185] swp/swpne ARMv7

Alan Woodland awoodland at debian.org
Tue Jan 5 12:04:32 UTC 2010


Hi,

I noticed today that BLCR is failing to build on armel on Ubuntu. This
problem is reported in [1]. It would seem that ARMv7 no longer
includes swp/swpne instructions. It's relatively trivial to
conditionally replace this with appropriate ldrex/strex instructions
instead though. Before I produce a patch though I have a few
questions:

1) CR_KCODE___kuser_cmpxchg clearly isn't defined at build time here.
The test doesn't get run because we're only building userspace parts
at this point. Is that correct? Are we always expecting to be in the
#else oflibcr/arch/arm/cr_atomic.h when building userspace bits? I
can't help but feel I've missed something in my reading of this
somehow though.
2) Is a 2nd alternative for
cri_atomic_inc/cri_atomic_dec_and_test/cri_cmp_swap the correct way to
fix this? The comments in the source seem to suggest that using
ldrex/strex would be correct and better where they exist. They also
imply that we shouldn be using __kernel_cmpxchg on newer kernels
anyway though.

Thanks,
Alan

[1] https://bugs.launchpad.net/ubuntu/+source/blcr/+bug/503185

-- 
fails to build on armel/lucid
https://bugs.launchpad.net/bugs/503185
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs




More information about the universe-bugs mailing list