ARM: 9169/1: entry: fix Thumb2 bug in iWMMXt exception handling
authorArd Biesheuvel <ardb@kernel.org>
Wed, 15 Dec 2021 08:31:36 +0000 (09:31 +0100)
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Fri, 17 Dec 2021 12:02:17 +0000 (12:02 +0000)
commit8536a5ef886005bc443c2da9b842d69fd3d7647f
treec376607dc2a422250496cd07040d89d81b9fc542
parent7202216a6f34d571a22274e729f841256bf8b1ef
ARM: 9169/1: entry: fix Thumb2 bug in iWMMXt exception handling

The Thumb2 version of the FP exception handling entry code treats the
register holding the CP number (R8) differently, resulting in the iWMMXT
CP number check to be incorrect.

Fix this by unifying the ARM and Thumb2 code paths, and switch the
order of the additions of the TI_USED_CP offset and the shifted CP
index.

Cc: <stable@vger.kernel.org>
Fixes: b86040a59feb ("Thumb-2: Implementation of the unified start-up and exceptions code")
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
arch/arm/kernel/entry-armv.S