Boot crash fix for 68030

From: Geert Uytterhoeven
Date: Sun Apr 06 2014 - 05:35:03 EST


Please queue the two commits below for stable:
- The second commit fixes a boot crash on 68030,
- The first commit is a prerequisite for the second.

This fix is needed on all versions that contain commit
e4f2dfbb5e92be4e46c0625f4f8eb101110f756f ("m68k: implement futex.h to support
userspace robust futexes and PI mutexes"), i.e. v3.10 until v3.14.

The first commit only applies cleanly to v3.14.
I appended a backported version for v3.10..v3.13 at the bottom of this email.

Thanks for applying!

commit 03b8c7b623c80af264c4c8d6111e5c6289933666
Author: Heiko Carstens <heiko.carstens@xxxxxxxxxx>
Date:   Sun Mar 2 13:09:47 2014 +0100

    futex: Allow architectures to skip futex_atomic_cmpxchg_inatomic() test
   
    If an architecture has futex_atomic_cmpxchg_inatomic() implemented and there
    is no runtime check necessary, allow to skip the test within futex_init().
   
    This allows to get rid of some code which would always give the same result,
    and also allows the compiler to optimize a couple of if statements away.
   
    Signed-off-by: Heiko Carstens <heiko.carstens@xxxxxxxxxx>
    Cc: Finn Thain <fthain@xxxxxxxxxxxxxxxxxxx>
    Cc: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
    Link: http://lkml.kernel.org/r/20140302120947.GA3641@osiris
    Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>

commit e571c58f313d35c56e0018470e3375ddd1fd320e
Author: Finn Thain <fthain@xxxxxxxxxxxxxxxxxxx>
Date:   Thu Mar 6 10:29:27 2014 +1100

    m68k: Skip futex_atomic_cmpxchg_inatomic() test
   
    Skip the futex_atomic_cmpxchg_inatomic() test in futex_init(). It causes a
    fatal exception on 68030 (and presumably 68020 also).
   
    Signed-off-by: Finn Thain <fthain@xxxxxxxxxxxxxxxxxxx>
    Acked-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
    Link: http://lkml.kernel.org/r/alpine.LNX.2.00.1403061006440.5525@xxxxxxxxxxxxxx
    Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>

---