• Ard Biesheuvel's avatar
    ARM: 9352/1: iwmmxt: Remove support for PJ4/PJ4B cores · b9920fdd
    Ard Biesheuvel authored
    PJ4 is a v7 core that incorporates a iWMMXt coprocessor. However, GCC
    does not support this combination (its iWMMXt configuration always
    implies v5te), and so there is no v6/v7 user space that actually makes
    use of this, beyond generic support for things like setjmp() that
    preserve/restore the iWMMXt register file using generic LDC/STC
    instructions emitted in assembler.  As [0] appears to imply, this logic
    is triggered for the init process at boot, and so most user threads will
    have a iWMMXt register context associated with it, even though it is
    never used.
    
    At this point, it is highly unlikely that such GCC support will ever
    materialize (and Clang does not implement support for iWMMXt to begin
    with).
    
    This means that advertising iWMMXt support on these cores results in
    context switch overhead without any associated benefit, and so it is
    better to simply ignore the iWMMXt unit on these systems. So rip out the
    support. Doing so also fixes the issue reported in [0] related to UNDEF
    handling of co-processor #0/#1 instructions issued from user space
    running in Thumb2 mode.
    
    The PJ4 cores are used in four platforms: Armada 370/xp, Dove (Cubox,
    d2plug), MMP2 (xo-1.75) and Berlin (Google TV). Out of these, only the
    first is still widely used, but that one actually doesn't have iWMMXt
    but instead has only VFPV3-D16, and so it is not impacted by this
    change.
    
    Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218427 [0]
    
    Fixes: 8bcba70c ("ARM: entry: Disregard Thumb undef exception ...")
    Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
    Acked-by: default avatarNicolas Pitre <nico@fluxnic.net>
    Reviewed-by: default avatarJisheng Zhang <jszhang@kernel.org>
    Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
    Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
    b9920fdd
iwmmxt.S 7.72 KB