swp/swpne ARMv7

From: Alan Woodland (awoodland_at_debian_dot_org)
Date: Tue Jan 05 2010 - 04:04:32 PST

  • Next message: Paul H. Hargrove: "Re: [BLCR-ARM] swp/swpne ARMv7"
    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
    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.
    [1] https://bugs.launchpad.net/ubuntu/+source/blcr/+bug/503185

  • Next message: Paul H. Hargrove: "Re: [BLCR-ARM] swp/swpne ARMv7"