ARM: tlb: ASID macro should give 32bit result for BE correct operation
authorVictor Kamensky <victor.kamensky@linaro.org>
Mon, 7 Oct 2013 15:48:23 +0000 (08:48 -0700)
committerVictor Kamensky <victor.kamensky@linaro.org>
Thu, 13 Mar 2014 21:49:52 +0000 (14:49 -0700)
commitb0e8afd6ffd73719ad05dfbcfd0e0a6ec674b0c2
treeaf4dc6f48e8b43d7b8f4cd241a4b18aa64382fde
parentf00f697ba020680765d95e0587e1dbf3ed9ed9f3
ARM: tlb: ASID macro should give 32bit result for BE correct operation

In order for ASID macro to be used as expression passed to
inline asm as 'r' operand it needs to give 32 bit unsigned result,
not unsigned 64bit expression.

Otherwise when 64bit ASID is passed to inline assembler statement
as 'r' operand (32bit) compiler behavior is not well specified.
For example when __flush_tlb_mm function compiled in big endian
case, and ASID is passed to tlb_op macro directly, 0 will be passed
as 'mcr 15, 0, r4, cr8, cr3, {2}' argument in r4, unless ASID
macro changed to produce 32 bit result.

Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
(cherry picked from commit a1af3474487cc3b8731b990dceac6b6aad7f3ed8)

Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org>
arch/arm/include/asm/mmu.h