arm64: fpsimd: avoid restoring fpcr if the contents haven't changed
authorWill Deacon <will.deacon@arm.com>
Thu, 10 Jul 2014 11:40:09 +0000 (12:40 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 18 Jul 2014 09:21:17 +0000 (10:21 +0100)
commit5959e25729a521097856d71528504deda1e11584
treece4fc3bb9d6b573450ea8c947d94d49eaeb6dad3
parentad789ba5f7086138461420d2156478d33fb61077
arm64: fpsimd: avoid restoring fpcr if the contents haven't changed

Writing to the FPCR is commonly implemented as a self-synchronising
operation in the CPU, so avoid writing to the register when the saved
value matches that in the hardware already.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/fpsimdmacros.h